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
how to enlarge header of blocks?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-08-27 (11:16)
From: Christian Lindig <lindig@c...>
Subject: Re: [Caml-list] how to enlarge header of blocks?

Am 26.08.2005 um 13:34 schrieb Mark Shinwell:

> What information do you wish to store?  Rather than adjusting the block
> headers, it might be possible to simply tack it onto the end as extra
> fields, provided those fields obey the GC structure constraints.

Currently I'd just like to store the address of the allocation site. 
I've tried adding an extra field, hoping that the run-time system would 
never access it. But either I did not get it right, or my assumptions 
about the run-time system were too simple. In any case, the programs 
crashed. I believe this had to do with the representation of arrays but 
no longer remember exactly.

As an alternative, one could maintain a table on the side that maps the 
address of the block to whatever information is associated with it. But 
since the garbage collector moves blocks, this isn't simple to 
maintain, either.

-- Christian