Re: Mixing size_t and other types
- From: "BGB / cr88192" <cr88192@xxxxxxxxxxx>
- Date: Sun, 1 Aug 2010 13:55:23 -0700
"Vincenzo Mercuri" <comp@xxxxxx> wrote in message
news:kN6dnRagtJbRU8jRnZ2dnUVZ8guhnZ2d@xxxxxxxxxxxxxxx
Ian Collins wrote:
There's also the small matter of files with a size > LONG_MAX.
Not that small actually :-)
95% of the time though, one knows when they are likely to be dealing with a
large file, and for the rest of the time, they can simply regard files
larger than a certain "reasonable" size to be invalid...
this is like, for example, assuming that the size of a JPEG or COFF object
is < 16MB.
yes, there *could* be a 16MB JPEG or COFF object passed in, but for sake of
convinience one can assume that it doesn't exist, or check the size and
refuse to accept it if it exceeds a certain limit.
it is still a fairly safe bet at the moment that most files are less than
2GB or 4GB, and so it is a reasonable enough working assumption for most
things.
.
- Follow-Ups:
- Re: Mixing size_t and other types
- From: Ian Collins
- Re: Mixing size_t and other types
- References:
- Mixing size_t and other types
- From: Navaneeth
- Re: Mixing size_t and other types
- From: Ian Collins
- Re: Mixing size_t and other types
- From: Navaneeth
- Re: Mixing size_t and other types
- From: Vincenzo Mercuri
- Re: Mixing size_t and other types
- From: Ian Collins
- Re: Mixing size_t and other types
- From: Vincenzo Mercuri
- Mixing size_t and other types
- Prev by Date: Ternary Conditional Fun Macros for Any Type
- Next by Date: Re: Mixing size_t and other types
- Previous by thread: Re: Mixing size_t and other types
- Next by thread: Re: Mixing size_t and other types
- Index(es):
Relevant Pages
|