I think Ancient is exactly what you're looking for. Just disable swap (which you should do anyway on a big modern server), and it will let you keep in-memory, out-of-heap OCaml values that don't get scanned by the GC. Anil On 8 Dec 2011, at 08:19, William Le Ferrand wrote: > hi Stephane > > Yes, but it's not exactly what we're looking for : we plan to access the data at a (very) high rate, so swapping/unswapping would probably kill the performance .. > > > On Wed, Dec 7, 2011 at 10:04 PM, Stéphane Glondu wrote: > Le 08/12/2011 05:35, William Le Ferrand a écrit : > > We are building a cache in ocaml and we're wondering if it would make > > sense to store ocaml values outside the reach of the gc. (gc on a 20GB > > cache hangs the process for a second or so). > > Have you heard of the ancient [1] library? > > [1] http://git.annexia.org/?p=ocaml-ancient.git;a=summary > > > Cheers, > > -- > Stéphane > > > > > -- > William Le Ferrand > > Mobile : (+1) (415) 683-1484 > Web : http://williamleferrand.github.com/ >