English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Memory cost of a compaction
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-12-02 (15:34)
From: David Baelde <david.baelde@g...>
Subject: Memory cost of a compaction

I have a program which memory consumption slowly increases (say from
6M to 8M resident set size, the total size being around 67M), and then
at some point after like 10 hours, suddenly exploses to 100M (rss) and
more until it crashes because of the lack of memory.

I've been tracking the problem for days. I found some memory leaks in
C bindings, but it doesn't explain the explosion which indeed still
happens. Using ocaml-memprof I could see that the number and size of
values is normal.

But I'm now wondering if after 10 hours a compaction could be
triggered because of fragmentation. I believe that a compaction would
allocate some memory in order to move data around, could it be the
cause for my explosion ? My question is: in the worst case, how much
memory can be needed for compaction ?

Thanks for any details about compaction -- pr any idea about this explosion.

PS: I know that I can trigger compaction manually, and log compactions
-- heap extensions are interesting too. I'll do that in the next run.