On 2012-01-01, at 13:44, Richard W.M. Jones wrote:

> Is compaction disabled?  lablgtk disables it unconditionally by
> setting the global Gc max_overhead (see also the Gc documentation):
> 
>  src/gtkMain.ml:
>    let () = Gc.set {(Gc.get()) with Gc.max_overhead = 1000000}

Anyone who disables compaction should seriously consider switching
to the first-fit allocation policy:

  let () = Gc.set {(Gc.get ()) with Gc.allocation_policy = 1}

This may slow down allocations a bit, but the theory tells us that
it completely prevents unbounded fragmentation of the OCaml heap.

-- Damien


-- 
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

Reply via email to