Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2003-12-13 (20:57)
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

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

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 Archives:
Bug reports: FAQ:
Beginner's list: