From: Martin Jambon <m.jambon@ibcp.fr>
To: francois bereux <francois.bereux@fr.thalesgroup.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Garbage collector and memory fragmentation
Date: Fri, 24 May 2002 13:36:08 +0200 [thread overview]
Message-ID: <5.1.0.14.0.20020524131856.009fb360@mail.ibcp.fr> (raw)
In-Reply-To: <20020524102257.GA17643@kiefer.ai.univie.ac.at>
At 12:22 24/05/02 +0200, Markus Mottl wrote:
>On Fri, 24 May 2002, francois bereux wrote:
> > My question is : does a garbage collector (for instance the one in
> > OCaml) deal with this kind of issues ( defragmentation of the memory )
> > in a situation similar to mine : many small lists of elements ?
>
>The GC employed by OCaml is able to compact the heap, which means
>it essentially defragments memory. You can parameterize it with the
>frequency of such compactions (they are very expensive), turn them off
>completely or force them manually. Take a look at the interface of the
>Gc-module in the distribution for more details.
Il y a 2 options :
- compaction automatique dès que l'espace de mémoire inutilisé dépasse x
% (en utilisant Gc.set et en spécifiant le champ max_overhead : Gc.set {
(Gc.get ()) with Gc.max_overhead = 200 };;)
- compaction explicite par appel à Gc.compact de temps en temps.
La première solution est la plus élégante, mais il y a un bug (cf. bug
report numero 1111) qui apparaît dans certains cas de figure non
déterminés. Je tenais juste à vous l'indiquer au cas où vous tomberiez
dessus...
Martin
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-05-24 11:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-24 7:23 francois bereux
2002-05-24 10:22 ` Markus Mottl
2002-05-24 11:36 ` Martin Jambon [this message]
2002-05-27 8:19 ` Xavier Leroy
2002-05-27 9:39 ` Christophe Raffalli
2002-05-27 13:37 ` francois bereux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.0.14.0.20020524131856.009fb360@mail.ibcp.fr \
--to=m.jambon@ibcp.fr \
--cc=caml-list@inria.fr \
--cc=francois.bereux@fr.thalesgroup.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox