From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 6398BBC32 for ; Thu, 17 Mar 2005 20:06:45 +0100 (CET) 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 j2HJ6jT8007769 for ; Thu, 17 Mar 2005 20:06:45 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA03567 for ; Thu, 17 Mar 2005 20:06:44 +0100 (MET) Received: from qrnik.knm.org.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2HJ6h3M007766 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 17 Mar 2005 20:06:44 +0100 Received: from qrczak by qrnik.knm.org.pl with local (Exim 3.36 #1) id 1DC0KM-0004AH-00 for caml-list@inria.fr; Thu, 17 Mar 2005 20:06:38 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] OCaml troll on Slashdot X-Face: OW>RV&gN+&b-aiNY|U)f=S%w+/rK!);f>/W9IXg})]&F>ht.1Up8@04+_!gOp(_/l_-+E^. 2\vI)1=D,%HWiq)r(M/V~dr^5T^KF/[w5YZ4<0Sus3+O>l3uA/&W_21m?.s,Po8{pb0@ References: <20050316001819.GB347@first.in-berlin.de> <200503160301.11138.jon@ffconsultancy.com> <20050316.224108.35690658.garrigue@math.nagoya-u.ac.jp> <4239BF15.3040504@cs.caltech.edu> From: "Marcin 'Qrczak' Kowalczyk" Mail-Followup-To: caml-list@inria.fr Date: Thu, 17 Mar 2005 20:06:38 +0100 In-Reply-To: <4239BF15.3040504@cs.caltech.edu> (Jason Hickey's message of "Thu, 17 Mar 2005 09:32:05 -0800") Message-ID: <87ekee148x.fsf@qrnik.zagroda> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: "Marcin 'Qrczak' Kowalczyk" X-Miltered: at concorde with ID 4239D545.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4239D543.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 minor:01 heap:01 writes:01 caltech:02 cons:03 allocated:03 allocated:03 meantime:04 triggered:05 allocate:06 edu:07 cells:08 sufficiently:10 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: Jason Hickey writes: > In general, the implementation needs to add a check during assignment: > "if the value being modified belongs to a strictly older generation > than the value being stored, then mark it." > > In the implementation of List.map using set_cdr! it should be possible > to eliminate the check. The cons-cell was just allocated, so it > should belong to the minor heap. No, the next cell was allocated afterwards, and it may have triggered GC in the meantime. When you allocate a sufficiently large number of cons cells in ascending order, a GC during that operation will cause some link to be old to young. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/