caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Inhibiting heap compaction
@ 2006-06-02 19:39 Florian Weimer
  2006-06-02 19:56 ` [Caml-list] " David MENTRE
  2006-06-02 20:25 ` Olivier Andrieu
  0 siblings, 2 replies; 4+ messages in thread
From: Florian Weimer @ 2006-06-02 19:39 UTC (permalink / raw)
  To: caml-list

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-06-06  6:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-02 19:39 Inhibiting heap compaction 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 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).