Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Freeing dynamically loaded code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nuutti Kotivuori <naked+caml@n...>
Subject: Re: [Caml-list] Freeing dynamically loaded code
Alain Frisch wrote:
> I was proposing to have an intermediate code block (made of
> CALL_DYN).

Ah yes, I see it now. I didn't really understand your proposal fully
in the beginning. And to be honest, I still am not sure of the actual
implementation.

I'll read it once more and probably ask some questions - I have yet
another idea which might be what you mean as well, or then again it
might not be - if you have the patience for me :-)

> I have been considering this idea too, but I think it does'nt work:
> sure, the GC won't free the code block, but it can still move it
> without updating the code pointer in the closure. Maybe this can be
> addressed by using a different GC tag to denote "movable" closures,
> so that the GC knows that the code pointer has to be translated by
> the same amount as the last slot (which is the pointer to the code
> block).

You are obviously right. I didn't even consider the GC moving the
block. Well that's it for the cleanliness of that idea - if there
needs to be a new block type or touching the GD, it's not really
better than the other suggestions, except in a performance sense.

-- Naked

-------------------
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