[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Olivier Andrieu <oandrieu@n...> |
| Subject: | Re: [Caml-list] Inhibiting heap compaction |
Florian Weimer [Friday 2 June 2006] :
>
> Is it possible to prevent the heap from being compacted,
Yes. cf the function Gc.set
Gc.set { (Gc.get()) with Gc.max_overhead = max_int }
> or pin individual objects?
AFAIK, no
> Currently, I copy all strings used in such a scenario, but this
> adds quite a bit of overhead.
Mind that your strings need to be in the major heap for the
no-heap-compaction approach to work. To ensure this, your strings must
be long enough or you should call Gc.minor () before calling the C
function.
--
Olivier