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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 9B098BBAF for ; Sat, 30 Oct 2010 19:16:04 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhABALLvy0xKfVK2kGdsb2JhbACTHYFTjFIIFQEBAQEJCQwHEQMfogGLcQEFjmABBIMDCII5 X-IronPort-AV: E=Sophos;i="4.58,265,1286143200"; d="scan'208";a="76811496" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail4-smtp-sop.national.inria.fr with ESMTP; 30 Oct 2010 19:16:04 +0200 Received: by wyb42 with SMTP id 42so4233533wyb.27 for ; Sat, 30 Oct 2010 10:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:references :in-reply-to:subject:date:organization:message-id:mime-version :content-type:content-transfer-encoding:x-mailer:thread-index :content-language; bh=GMU88x/Ce2VyTgzPk4LOnXZ9285DttMP/Ngf+DiY4iI=; b=jsP7F6mfViFHjSG5GbVD89pc7QLo98fF5vYSbq4I/iYiVTvLVKgsuPRse6GbfoJB5s 4PGdhJ9KQpyJp8TW/g27S0NALv7i1vNwyXp9k8AfOQ7gIDaNzT2rcB9Fam5fGbRUCVBJ O/Y4mYK8bhYPbFlPZvxHCCwWEYJSkqR1wRo1E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:references:in-reply-to:subject:date:organization:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; b=QYMJjERpQYJ79XBte4FWriJa01PXX0axboNXUoe0DCn0nfpZl+3i2pcHSWwrkRC4v5 CfxQvPvBo9Ieor24qUMElD0h/vOEEHkS60jJdVdkkmfaaTa3FOSBHo+jjmG62bICf94B I/V7ZdrQljWpatXmeem57pSjfHbbW5bmYk+JY= Received: by 10.227.142.146 with SMTP id q18mr13752155wbu.163.1288458963343; Sat, 30 Oct 2010 10:16:03 -0700 (PDT) Received: from WinEight ([84.93.140.187]) by mx.google.com with ESMTPS id b30sm3318141wbb.4.2010.10.30.10.16.00 (version=SSLv3 cipher=RC4-MD5); Sat, 30 Oct 2010 10:16:01 -0700 (PDT) From: Jon Harrop To: "'Damien Doligez'" , References: <418632253.26199.1288302511712.JavaMail.root@zmbs1.inria.fr> <8277D889-83E2-4037-91B3-3EB5E9EB2EA9@inria.fr> In-Reply-To: <8277D889-83E2-4037-91B3-3EB5E9EB2EA9@inria.fr> Subject: RE: [Caml-list] How does OCaml update references when values are moved by the GC? Date: Sat, 30 Oct 2010 18:15:56 +0100 Organization: Flying Frog Consultancy Message-ID: <018c01cb7856$1e228350$5a6789f0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Act3PavYsjUfA3x6RLCODGfu833R6ABE5asw Content-Language: en-gb X-Spam: no; 0.00; ocaml:01 pointers:01 pointers:01 compaction:01 run-time:01 traversing:01 rewriting:01 hash:01 cheers:01 damien:01 ocaml:01 damien:01 beginner's:01 bug:01 bounces:98 I was hoping for a little more detail, of course. :-) How is the mapping from old to new pointers stored? Does the GC rewrite all of the thread-local stacks in series before allowing any of them to continue? Does the write barrier record pointers written into the major heap so only those specific locations are rewritten at minor heap collections but the entire major heap is rewritten upon compaction? Can the GC distinguish between an array of ints and an array of pointers at run-time in order to avoid traversing all of the ints when trying to rewrite pointers? Also, any idea what the maximum proportion of the running time of a program is spent doing this rewriting? For example, if you fill a float->float hash table with values does updating the pointers in the major heap account for a significant proportion of the total running time of the program? Cheers, Jon. > -----Original Message----- > From: caml-list-bounces@yquem.inria.fr [mailto:caml-list- > bounces@yquem.inria.fr] On Behalf Of Damien Doligez > Sent: 29 October 2010 08:48 > To: caml users > Subject: Re: [Caml-list] How does OCaml update references when values > are moved by the GC? > > > On 2010-10-28, at 23:48, Jon Harrop wrote: > > > How does OCaml update references in the stacks and heap when values > are > > moved by the GC? > > > They are updated by the GC, of course. > > -- Damien > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs