English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] GC and preventing data relocation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-21 (01:17)
From: Christopher Quinn <cq@h...>
Subject: Re: [Caml-list] GC and preventing data relocation
Markus Mottl wrote:
>>a) if you have C-heap struct specific to each invocation, register the 
>>field holding the string pointer as a caml root, deregister it on 
>>completion. but that is more overhead.
> I don't quite understand this solution. How should this prevent the
> string from being relocated if the string was allocated in the OCaml-heap?

it wouldn't, but at least the pointer to it is changed also. and the 
assumption i made was that the glue code knows where it is keeping its 
pointer to the string.

>>b) add a CString_tag to the set of value tags, modify the compactor() 
>>routine to take acccount of it, and change the tag of a regular string 
>>at runtime.
>>unfortunately this scheme greatly inconveniences the design of the 
>>compactor and would likely slow it down.
> And wouldn't be particulary portable...

what 3rd party modification to the distributed caml runtime is!?

- chris

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners