From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 0EE81BDE8 for ; Thu, 1 Sep 2005 13:53:21 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j81BrKU7010822 for ; Thu, 1 Sep 2005 13:53:20 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA21945 for ; Thu, 1 Sep 2005 13:53:19 +0200 (MET DST) Received: from copper.three-tuns.net (copper.three-tuns.net [193.201.200.235]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j81BrJFR001575 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 1 Sep 2005 13:53:19 +0200 Received: from mark by copper.three-tuns.net with local (Exim 4.52) id 1EAnd9-0006f4-1T; Thu, 01 Sep 2005 12:53:19 +0100 Date: Thu, 1 Sep 2005 12:53:19 +0100 From: Mark Shinwell To: Christian Lindig Cc: Caml List Subject: Re: [Caml-list] how to enlarge header of blocks? Message-ID: <20050901115319.GE5470@three-tuns.net> References: <34f22df101c14e15560de909ace48d3a@cs.uni-sb.de> <20050826113400.GB5470@three-tuns.net> <6a0d230d1d1dd537d5c33ff693437c84@cs.uni-sb.de> <20050830111624.GC5470@three-tuns.net> <28b5733129446c3d12d090f5f66c1e3e@cs.uni-sb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28b5733129446c3d12d090f5f66c1e3e@cs.uni-sb.de> User-Agent: Mutt/1.5.9i Sender: Mark Shinwell X-Miltered: at concorde with ID 4316EBB0.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4316EBAF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; shinwell:01 shinwell:01 caml-list:01 lindig:01 interfacing:01 bytecode:01 runtime:01 ocaml:01 runtime:01 rocquencourt:01 2005,:98 ...:98 wrote:01 wrote:01 caml:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 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 :-) Mark