From: Florian Weimer <fw@deneb.enyo.de>
To: Olivier Andrieu <oandrieu@nerim.net>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Inhibiting heap compaction
Date: Tue, 06 Jun 2006 07:35:54 +0200 [thread overview]
Message-ID: <87r7227sn9.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <17536.40628.573298.310156@karryall.dnsalias.org> (Olivier Andrieu's message of "Fri, 2 Jun 2006 22:25:24 +0200")
* Olivier Andrieu:
> 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 }
It looks as if it is possible to modify caml_percent_max directly from
C code. Hmm.
It would be better if C stack frames could be marked instead. That
way, the "no compaction, please" would be cleared automatically even
if exceptions are involved.
> > 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.
I had hoped to use Is_young to see if copying the object is still
necessary but it's not exported by the run-time library.
Well, looks as if I should defer this until copying is truly
unacceptable.
prev parent reply other threads:[~2006-06-06 6:35 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 ` [Caml-list] " David MENTRE
2006-06-02 20:25 ` Olivier Andrieu
2006-06-06 5:35 ` Florian Weimer [this message]
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=87r7227sn9.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=caml-list@yquem.inria.fr \
--cc=oandrieu@nerim.net \
/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