Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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-09-01 (11:53)
From: Mark Shinwell <Mark.Shinwell@c...>
Subject: Re: [Caml-list] how to enlarge header of blocks?
On Thu, Sep 01, 2005 at 10:07:37AM +0200, Christian Lindig wrote:
> On Aug 30, 2005, at 1:16 PM, Mark Shinwell wrote:
> >If the extra field obeys the GC structure constraints (see the Caml
> >documentation on interfacing to C) then you shouldn't have any
> >problem...
> Maybe we have different things in mind, so I'll elaborate my idea 
> briefly and why it was too simple: I changed the allocation routine in 
> the bytecode runtime to allocate one extra word where I intended to 
> store some information as an Ocaml value. However, I overlooked that 
> Array.length and String.length use the block size denoted by the header 
> to determine the length.

Yes, there does seem to be a problem here; it wouldn't surprise me if
there are other similar pieces of code elsewhere in the runtime as well.
I'm not entirely sure what the best solution is, but I'll be visiting
Rocquencourt next week and will try to ask :-)