Browse thread
[Caml-list] Freeing dynamically loaded code
[
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: | 2003-12-13 (03:05) |
From: | skaller <skaller@o...> |
Subject: | Re: [Caml-list] Freeing dynamically loaded code |
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