Re: Can a process use up more than 910MB?

From: Khimenko Victor (khim@sch57.msk.ru)
Date: Wed Jan 05 2000 - 21:37:38 EST


In <Pine.LNX.3.96.1000105230219.16509A-100000@flakey.df.lth.se> Peter Tufvesson (tuwe@flakey.df.lth.se) wrote:

> Hi all,

> After reading/searching through this mailing list, I got the feeling a
> process could use up to 3GB of virtual memory per default.

> Since we really need this (We run commercial simulation tools like
> ModelSim that uses up to 1.5GB today)

> So, we write a small program (included below) to test this. The machine
> had 1GB of physical memory and a a 2GB swap device. After each megabyte of
> allocated memory the program prints the current allocated memory. Once no
> more memory can be allocated, it sleeps for a while (long enough to check
> the result with top) and then exits.

> It turned out that a 2.1.12 kernel compiled for 1GB of physical memory
> only allowed the process to allocate 910MB! Can anyone comment on this? I
> believed it would be possible to use more...

It IS possible to use more. Just not so easy :-)

> I also run two of these processes in parallel, and then both got exactly the
> same amount, 910MB...

Ask in glibc mailing list. It's not kernel limitation but rather glibc's
malloc limitation. Perhaps you can use mmap or something like this to allocate
more then 910MiB RAM.

You need virtual memory not only for heap but also for stack, for shared
libraries and so on. Default layout allows usage of only 910MiB for heap...

-
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 : Fri Jan 07 2000 - 21:00:05 EST