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 obvious places in which government can narrow the chasm between haves and have-nots. One is the public schools, which have been seen as the great leveler, the authentic melting pot. That, today, is nonsense. In his scathing study of the nation’s public school system entitled “Savage Inequalities,” Jonathan Kozol made manifest the truth: that we have a system that discriminates against the poor in everything from class size to curriculum.
    Anna Quindlen (b. 1952)

    This teaching is not practical in the sense in which the New Testament is. It is not always sound sense in practice. The Brahman never proposes courageously to assault evil, but patiently to starve it out. His active faculties are paralyzed by the idea of caste, of impassable limits of destiny and the tyranny of time.
    Henry David Thoreau (1817–1862)