From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 27B14BBAF for ; Thu, 25 Nov 2010 14:36:51 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AugDAJf07UzZSMDdgmdsb2JhbACjChUBAQsLCAcTAx+/D4VHBI1w X-IronPort-AV: E=Sophos;i="4.59,253,1288566000"; d="scan'208";a="80954966" Received: from fmmailgate01.web.de ([217.72.192.221]) by mail2-smtp-roc.national.inria.fr with ESMTP; 25 Nov 2010 14:36:50 +0100 Received: from smtp08.web.de ( [172.20.5.216]) by fmmailgate01.web.de (Postfix) with ESMTP id 9E1E017CE6B81; Thu, 25 Nov 2010 14:27:49 +0100 (CET) Received: from [78.43.204.177] (helo=frosties.localdomain) by smtp08.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #24) id 1PLbrZ-0002dJ-00; Thu, 25 Nov 2010 14:27:49 +0100 Received: from mrvn by frosties.localdomain with local (Exim 4.72) (envelope-from ) id 1PLbrY-0007Ea-SC; Thu, 25 Nov 2010 14:27:48 +0100 From: Goswin von Brederlow To: DS Cc: caml-list Subject: Re: [Caml-list] OCaml memory leak issue References: <201011231954241577004@cecs.pdx.edu> <20101124093035.473bd2e5@deb0> <87lj4ipcqk.fsf@frosties.localnet> <9C5FD85D-4AA0-443B-A626-BC4401712709@sol42.com> Date: Thu, 25 Nov 2010 14:27:48 +0100 In-Reply-To: <9C5FD85D-4AA0-443B-A626-BC4401712709@sol42.com> (DS's message of "Thu, 25 Nov 2010 00:41:04 +0100") Message-ID: <87ipzlednv.fsf@frosties.localnet> User-Agent: Gnus/5.110009 (No Gnus v0.9) XEmacs/21.4.22 (linux, no MULE) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX1+rJNW+K8fbS9BueY+IJgQkD/tv2X12R6ctkEW6 OWPM0S8geDbCbJWOON0CUURhJOtyKW6Fr91ugxSbZy6CoygBgi TfsLzLrqI= X-Spam: no; 0.00; ocaml:01 tokens:01 pervasives:01 runtime:01 42.:98 mfg:98 imho:01 wrote:01 caml-list:01 writes:01 caml:02 exits:02 variables:02 variables:02 exit:04 DS writes: > On 24 Nov 2010, at 23:40, Goswin von Brederlow wrote: >> In case of custom blocks and finalize function I believe this to be an >> error. Managing resources that the OS does not free (IPC tokens, >> tempfiles, ...) is made much harder due to this. > But you can force a final GC run with Pervasives.at_exit Gc.full_major. > Regards. > -DS But you can't force global variables to be freeed. Imho it would be nice to have a GC setting where one could tell the runtime to free everything, including global variables, before it exits. MfG Goswin