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] CamlDL/Abstract pointers problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-01-30 (15:48)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] CamlDL/Abstract pointers problem
On Sat, 31 Jan 2004, Jacques Garrigue wrote:

> The trouble is that you may at some point in time pass to your ML
> program a pointer to some C structure outside of the heap. Since it is
> outside of the heap, the garbage collector does not attempt to visit
> it, and this creates no problem.
> But it may happen (if your structure is freed on the C side), that at
> some time in the future a new page is added to the heap, containing
> the location where was the C structure.  If your pointer on the ML
> side is still around, this is now a pointer to somewhere in the heap,
> and the GC will attempt to visit it.

Ah.  OK.  That's reasonable- solving it in the Ocaml system would be way 
too hard to be worthwhile.

"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
                                - Gene Spafford 

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: