I replaced call of 'malloc' in 'caml_alloc_for_heap' function to mmap, and 'free' in 'caml_free_for_heap' to unmap. Unused memory is freed after Gc.compaction. On Sat, Apr 21, 2012 at 11:26 AM, wrote: > There is a commit dating from a few days ago that might > be related to your problem (commit msg was : > PR#5389: compaction sometimes leaves a very large heap) > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > >