Allocation Size Limits
The largest possible memory block malloc
can allocate depends on the host system, particularly the size of physical memory and the operating system implementation. Theoretically, the largest number should be the maximum value that can be held in a size_t
type, which is an implementation-dependent unsigned integer representing the size of an area of memory. The maximum value is 2CHAR_BIT × sizeof(size_t) − 1, or the constant SIZE_MAX
in the C99 standard.
Read more about this topic: C Dynamic Memory Allocation
Famous quotes containing the words size and/or limits:
“Learn to shrink yourself to the size of the company you are in. Take their tone, whatever it may be, and excell in it if you can; but never pretend to give the tone. A free conversation will no more bear a dictator than a free government will.”
—Philip Dormer Stanhope, 4th Earl Chesterfield (16941773)
“Now rest in peace, our patriot band;
Though far from natures limits thrown,
We trust they find a happier land,
A brighter sunshine of their own.”
—Philip Freneau (17521832)