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 EAA24738; Sat, 13 Dec 2003 04:05:14 +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 EAA24719 for ; Sat, 13 Dec 2003 04:05:12 +0100 (MET) Received: from mail1.tpgi.com.au (mail.tpgi.com.au [203.12.160.57]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hBD35A122573 for ; Sat, 13 Dec 2003 04:05:10 +0100 (MET) Received: from 203-213-84-25-syd-ts16-2600.tpgi.com.au (203-213-84-25-syd-ts16-2600.tpgi.com.au [203.213.84.25]) by mail1.tpgi.com.au (8.11.6/8.11.6) with ESMTP id hBD34vY05150; Sat, 13 Dec 2003 14:04:58 +1100 Subject: Re: [Caml-list] Freeing dynamically loaded code From: skaller Reply-To: skaller@ozemail.com.au To: Alain.Frisch@ens.fr Cc: Nuutti Kotivuori , Caml list In-Reply-To: References: Content-Type: text/plain Message-Id: <1071281096.14110.16.camel@pelican> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 13 Dec 2003 13:04:57 +1100 Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 dynamically:01 ozemail:01 alain:01 frisch:01 subroutine:01 closure:01 collector:02 wrote:03 wrote:03 addresses:96 let:04 loaded:04 pointing:04 graph:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 2003-12-13 at 08:26, Alain.Frisch@ens.fr wrote: > On Fri, 12 Dec 2003, Nuutti Kotivuori wrote: > > > Well, like Xavier Leroy said at the end of the mail - *he* probably > > isn't doing it. That doesn't mean there wouldn't be someone else crazy > > enough to try :-) > > > > And atleast I'm not dropping the investigation just yet. > > Thinking again about the technical challenge (put the dynlink'ed code > under GC control), I think the following approach is worth a try. > > The question is how to let the GC know that the code block cannot be freed > as long as there is some accessible closure pointing into this block. That is not enough. It is not necessary for some code to be active in order that it may later *become* active as a result of a subroutine call or jump. It would be necessary to find all code addresses and which blocks they point to, and build a dependency graph, and add the roots of that graph to the gc memory graph as well. Otherwise, after you say #load xxxx the collector would immediately free it :-) ------------------- 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