Messages in this thread | | | Date | Fri, 7 Jan 2000 02:42:41 +0100 (CET) | From | Peter Tufvesson <> | Subject | Re: Can a process use up more than 910MB? |
| |
On Fri, 7 Jan 2000, Lincoln Dale wrote:
> At 16:13 06/01/00 +0100, Peter Tufvesson wrote: > >I have now tried the program below on 2.2.12, 2.2.13, 2.3.36 (High memory > >support: Off, 4GB and 64GB) with the same result: > > > >My program can only allocate 910MB !!! > > > >What can be done about this? I need at least 2GB of virtual memory per > >process. I thought Linux could handle this? > > linux can handle it. > > you need your malloc library to support getting additional pages via mmap(). > brk() will only allow you to allocate up to ~910M. > > the simplest way of explaining this is for you to download dlmalloc and use > that. > see http://g.oswego.edu/dl/html/malloc.html
Yes, so Linux can handle this if you have the source code. Now, this is not always the case. So if I have a pre-compiled program (commercial product, that is) that happens to use malloc() and not mmap(), I in fact have a system which only allows me 910MB per process.
I believe this can be improved radically. Let the heap grow upwards but the mmap are grow downwards! Voila, you can allocate up to 3GB of heap OR 3GB of mmap! This is how Solaris handles the problem, by the way.
/Peter
- 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/
| |