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-26 (11:34)
From: Mark Shinwell <Mark.Shinwell@c...>
Subject: Re: [Caml-list] how to enlarge header of blocks?
On Fri, Aug 26, 2005 at 10:10:04AM +0200, Christian Lindig wrote:
> For tracking additional information about heap blocks I'd like to store  
> an additional word in each block. Has anybody experience with changing  
> the compiler and run-time system accordingly?

I've had reason to consider such things before in the context of Fresh
O'Caml, but thankfully have so far managed to avoid having to do this:
it is probably quite a serious undertaking, although I imagine it mainly
reduces to adjusting mlvalues.h.

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.  I've
wondered about such schemes to enable me to determine at runtime which
fields of a record were marked mutable in the source code, something
which is not possible at the moment.