Version française
Home     About     Download     Resources     Contact us    
Browse thread
OCaml runtime using too much memory in 64-bit Linux
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stefan Monnier <monnier@i...>
Subject: Re: OCaml runtime using too much memory in 64-bit Linux
> and uses a page table for this purpose, with a dense representation
> (an array of bytes).  If the major heap areas are closely spaced, this
[...]
> For 32-bit platforms, this isn't much of a problem since the maximum
> size of the page table is 1 megabytes.  For 64-bit platforms, the sky

How about allocating this array of bytes via mmap and then leave it
uninitialized (relying on POSIX's guarantee that it's already
initialized to zeros)?
This way you can easily have a 4GB "dense" table which doesn't use much
RAM since most of the 4GB will be mapped (via copy-on-write) to the same
"zero page".


        Stefan


PS: Obviously this is orthogonal to the potential change in page-size
recommended by Brian.