Re: maximum memory limit

From: Rik van Riel (riel@nl.linux.org)
Date: Tue Feb 08 2000 - 20:52:57 EST


On Tue, 8 Feb 2000, Lee Chin wrote:

> Just to make sure I have this correct, an application can call brk
> to allocate memory from its heap space for upto 1GB, after which
> it has to switch to using mmap for the rest. Is this 1GB fixed or
> will it ever change? (if it does, it might break my application).

IMHO malloc() should switch to mmap() for the rest :)

> >around 900M if the malloc uses sbrk, but more if it uses mmap.
> >modern libc's will use mmap for large allocations, since unlike
> >sbrk, mmap can actually free memory back to the OS.
>
> Which version of libc has malloc that uses mmap after 1GB?

None, AFAIK. They use mmap() when you malloc() bigger chunks,
but they don't use it for smaller chunks when you've run out
of the first 1GB...

(I'd love to be proven wrong, though...)

regards,

Rik

--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:14 EST