caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David MENTRE <dmentre@linux-france.org>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Inhibiting heap compaction
Date: Fri, 02 Jun 2006 21:56:30 +0200	[thread overview]
Message-ID: <87ac8vz5zl.fsf@linux-france.org> (raw)
In-Reply-To: <87y7wfxs7y.fsf@mid.deneb.enyo.de> (Florian Weimer's message of "Fri, 02 Jun 2006 21:39:13 +0200")

Hello,

Florian Weimer <fw@deneb.enyo.de> writes:

> Is it possible to prevent the heap from being compacted, or pin
> individual objects?

You can prevent heap compaction:
http://caml.inria.fr/pub/docs/manual-ocaml/libref/Gc.html#TYPEcontrol

   	mutable max_overhead : int; (* Heap compaction is triggered when
   	               the estimated amount of "wasted" memory is more
   	               than max_overhead percent of the amount of live
   	               data. If max_overhead is set to 0, heap
   	               compaction is triggered at the end of each major
   	               GC cycle (this setting is intended for testing
   	               purposes only). If max_overhead >= 1000000,
   	               compaction is never triggered. Default: 500. *)

Use Gc.set to change those parameters.

Best wishes,
d.

PS: I think Lablgtk prevent heap compaction for similar reasons.
-- 
pub  1024D/A3AD7A2A 2004-10-03 David MENTRE <dmentre@linux-france.org>
 5996 CC46 4612 9CA4 3562  D7AC 6C67 9E96 A3AD 7A2A


  reply	other threads:[~2006-06-02 19:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-02 19:39 Florian Weimer
2006-06-02 19:56 ` David MENTRE [this message]
2006-06-02 20:25 ` [Caml-list] " Olivier Andrieu
2006-06-06  5:35   ` Florian Weimer

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=87ac8vz5zl.fsf@linux-france.org \
    --to=dmentre@linux-france.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=fw@deneb.enyo.de \
    /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;
as well as URLs for NNTP newsgroup(s).