Re: Gc Question

From: Damien Doligez (Damien.Doligez@inria.fr)
Date: Thu Dec 23 1999 - 17:54:04 MET


Date: Thu, 23 Dec 1999 17:54:04 +0100
From: Damien Doligez <Damien.Doligez@inria.fr>
Message-Id: <199912231654.RAA10243@tobago.inria.fr>
To: caml-list@inria.fr
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
heap.

>unless
>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
individually.

-- Damien



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:29 MET