Am Mittwoch, den 08.01.2014, 11:55 +0000 schrieb Mark Shinwell: > On 8 January 2014 11:36, Gerd Stolpmann wrote: > > There is a workaround in place - so far the OS supports it: thanks to > > Xavier the symbols caml_modify and caml_initialize are declared as weak > > in 4.01, allowing them to be redefined in executables. Netmulticore > > redefines these symbols with their pre-4.01 functions. > > > > This isn't optimal yet, because the old write barriers are a bit slower, > > and because this introduces a very low-level dependency on the current > > version of Ocaml. Nevertheless, it works for now. (Ideas for a better > > solution are highly welcome.) > > Jeremie Dimino and myself have a somewhat embryonic proposal > that should permit most of the write barrier to be > circumvented for out-of-heap access, and also avoid the page > table test. We'll send mail to the list in due course once > we've had time to think about this further. I'm very curious to hear about that. So far I have only the idea to override the := operator selectively in all modules that want to modify out-of-heap values: let ( := ) = Netmcore_heap.assign h where Netmcore_heap.assign is a C function that tests whether the destination address is in the out-of-heap address space of h. If so, the assignment can be done directly. If not, it just falls back to a normal caml_modify. This solution isn't nice, though, because it can be very problematic to have the extra indirection of ref. So, what I'm searching for is a way to turn any record mutation into an external C function call (or at least to parametrize the write barrier somehow). Gerd > Mark > -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de Creator of GODI and camlcity.org. Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------