English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: Gc Question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-12-23 (18:59)
From: Damien Doligez <Damien.Doligez@i...>
Subject: Re: Gc Question
>From: skaller <skaller@maxtal.com.au>

>How does (or should I say 'can') the garbage collector
>tell the difference between a pointer to a structured block,
>and a pointer to something else (outside the caml heap)?

Quite simply, a pointer to outside the heap points outside the heap...
Concretely, this is done by dividing the memory into 4k "pages" and
having a table of bytes to tell for each page whether it is in the

>the collector 'knows' where all structure blocks live
>and tests for that. [Conservative collectors often do just that]
>Is this the case??

In short, yes, although the collector doesn't know about each block

-- Damien