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:

    There are some persons we could not cut down to size without diminishing ourselves as well.
    Jean Rostand (1894–1977)

    Caring for children is a dance between setting appropriate limits as caretakers and avoiding unnecessary power struggles that result in unhappiness.
    Charlotte Davis Kasl (20th century)