caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: caml-list@yquem.inria.fr
Subject: Inhibiting heap compaction
Date: Fri, 02 Jun 2006 21:39:13 +0200	[thread overview]
Message-ID: <87y7wfxs7y.fsf@mid.deneb.enyo.de> (raw)

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

Suppose I write a C function C_func, which takes a string argument.
It passes that argument to some library function lib_func (which has
been written by a third party).  bar invokes a C callback C_cb.  In my
wrapper for Caml, C_cb invokes the Caml function cb.  cb conses and
triggers heap compaction.  After return from cb and C_cb, bar uses the
old address of the string, which is incorrect.

Currently, I copy all strings used in such a scenario, but this adds
quite a bit of overhead.


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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-02 19:39 Florian Weimer [this message]
2006-06-02 19:56 ` [Caml-list] " David MENTRE
2006-06-02 20:25 ` 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=87y7wfxs7y.fsf@mid.deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=caml-list@yquem.inria.fr \
    /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).