From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id CAA08422; Fri, 21 Mar 2003 02:17:13 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA07860 for ; Fri, 21 Mar 2003 02:17:12 +0100 (MET) Received: from t2.fast.net.uk (ns1.fast.net.uk [212.42.162.2]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h2L1HBX20875 for ; Fri, 21 Mar 2003 02:17:11 +0100 (MET) Received: from htec.demon.co.uk (adsl-212-42-169-63.fast.net.uk [212.42.169.63]) by t2.fast.net.uk (8.11.6/8.11.4) with ESMTP id h2L1GwN75840; Fri, 21 Mar 2003 01:17:04 GMT Message-ID: <3E7A67C6.5030302@htec.demon.co.uk> Date: Fri, 21 Mar 2003 01:15:50 +0000 From: Christopher Quinn User-Agent: Mozilla/4.61 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Markus Mottl CC: OCAML Subject: Re: [Caml-list] GC and preventing data relocation References: <20030320151647.GA15121@fichte.ai.univie.ac.at> <3E7A0861.9020607@htec.demon.co.uk> <20030321000134.GA17993@fichte.ai.univie.ac.at> In-Reply-To: <20030321000134.GA17993@fichte.ai.univie.ac.at> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; caml-list:01 struct:01 invocation:01 ocaml-heap:01 glue:01 compactor:01 runtime:01 chris:01 quinn:01 caml:01 htec:01 mottl:02 pointer:03 overhead:03 string:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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