C Dynamic Memory Allocation - Allocation Size Limits

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:

    For truly I tell you, if you have faith the size of a mustard seed, you will say to this mountain, ‘Move from here to there,’ and it will move; and nothing will be impossible for you.
    Bible: New Testament, Matthew 17:20.

    To the extent to which genius can be conjoined with a merely good human being, Haydn possessed genius. He never exceeds the limits that morality sets for the intellect; he only composes music which has “no past.”
    Friedrich Nietzsche (1844–1900)