From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id A6C407EE99 for ; Wed, 11 Dec 2013 14:01:49 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of edwin+ml-ocaml@etorok.net) identity=pra; client-ip=62.113.205.31; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="edwin+ml-ocaml@etorok.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of edwin+ml-ocaml@etorok.net designates 62.113.205.31 as permitted sender) identity=mailfrom; client-ip=62.113.205.31; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="edwin+ml-ocaml@etorok.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@mx.etorok.net designates 62.113.205.31 as permitted sender) identity=helo; client-ip=62.113.205.31; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="postmaster@mx.etorok.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoFAJFhqFI+cc0f/2dsb2JhbABZgwe6NoEgFnSCJQEBBAFAOg8LGAkTEg8CRhMIAod4CrEShFiLdREGjw8WhB6YGIpLh0iDKzo X-IPAS-Result: AgoFAJFhqFI+cc0f/2dsb2JhbABZgwe6NoEgFnSCJQEBBAFAOg8LGAkTEg8CRhMIAod4CrEShFiLdREGjw8WhB6YGIpLh0iDKzo X-IronPort-AV: E=Sophos;i="4.93,871,1378850400"; d="scan'208";a="48300800" Received: from mx.etorok.net ([62.113.205.31]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Dec 2013 14:01:48 +0100 Received: by mx.etorok.net (OpenSMTPD) with ESMTP id e3026495; for ; Wed, 11 Dec 2013 15:01:45 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=etorok.net; h= message-id:date:from:mime-version:to:references:in-reply-to :content-type:content-transfer-encoding; s=ml; l=1027; bh=SOT0No DrMVtGuOP4QsCHMCSO5cI=; b=O1ALmKJrdyu3DNXUEw0k/E6LZ0lC3zEjuxRT03 M8i+tYSBfJqLbBjXKXRTzdwfSR97rYTyP0PHTBzP7WxgURbwJgES0Sp6SPt9OpE/ 2lPFGflLVzK7gQnWprcI3uCbLzDpbOldlf/e3T7shQaPGej8pi3aHd7jpDQR0XIr BxV74= Received: by mx.etorok.net (OpenSMTPD) with ESMTPSA id cf79c79c; TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO; for ; Wed, 11 Dec 2013 15:01:45 +0200 (EET) Message-ID: <52A86239.30107@etorok.net> Date: Wed, 11 Dec 2013 15:01:45 +0200 From: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: caml-list@inria.fr References: <52A8508D.2050000@inria.fr> In-Reply-To: <52A8508D.2050000@inria.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Mismatch between Gc.full_major() documentation and behaviour On 12/11/2013 01:46 PM, Bertrand Jeannet wrote: > According to the documentation, the sequence > "Gc.major();Gc.full_major()" should be equivalent to > "Gc.full_major()", as Gc.full_major() is told to terminate the > current major gc and perform a complete new cycle. They both perform a minor GC cycle too. So you run a minor cycle twice with 'Gc.major(); Gc.full_major()', but only one with 'Gc.full_major()'. > > In my case it is not the case: "Gc.major(); Gc.full_major()" performs > more calls to finalisation functions than "Gc.full_major()". > > My context: I use a weak hashtables containing finalised value (with > Gc.finalise). > > The documentation of Weak module specifies that the finalization > function is called after the weak hashtbl/array has been set to > none. > > Does someone know the explanation of this ? You can run 'Gc.print_stat stderr' to check how many GC minor/major cycles are run in both cases. The number of minor cycles should be different. Best regards, --Edwin