Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 
Brian

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