Re: maximum memory limit

From: Stephen C. Tweedie (sct@redhat.com)
Date: Tue Feb 08 2000 - 10:53:01 EST


Hi,

On Tue, 8 Feb 2000 01:59:53 -0500 (EST), Lee Chin <leechin@mail.com>
said:

> Sorry if this is the wrong list, but what is the maximum virtual memory an
> application can malloc in the latest kernel?

> Just doing a (for example) "malloc(1024)" in a loop will max out close to
> 1GB even though I have 4 GB ram on my system.

The maximum per process is 3GB, but the virtual address space is
necessarily split into different areas. The problem here is that glibc
allocates small kmalloc requests from a "heap" which grows contiguously,
and when that section of virtual memory hits another one (the mmap()
area), it cannot grow any larger.

Ideally glibc should then be able to mmap() itself another chunk of
anonymous memory and continue servicing small mallocs from that, but in
its current implementation glibc will only use this mechanism for large
malloc requests.

--Stephen

-
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:12 EST