Re:Night of a cascading failure
by mikeash on Tuesday January 22, 2019 @08:20PM
(#18974786)
size_t is guaranteed to hold values large enough to index into any array you can allocate. On a 64-bit system with an allocator that supports allocations larger than 4GB, that means size_t has to be larger than 32 bits. If it's an LLP64 system, size_t will be larger than long. If the value represents an index or size of something in memory, use size_t. Consider ssize_t if you need negative values and are certain you never need the larger half of the size_t range.
[ Parent
| on HN ]
There are no comments on this comment yet.