[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Florian Weimer <fw@d...> |
| Subject: | Inhibiting heap compaction |
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.