From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 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 54B91BBAF for ; Thu, 25 Jun 2009 17:14:21 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgMCAFMxQ0pQW+UCe2dsb2JhbACYdAEBFiQEuGCEDQU X-IronPort-AV: E=Sophos;i="4.42,290,1243807200"; d="scan'208";a="42418617" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 25 Jun 2009 17:14:21 +0200 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MJqeV-0000qu-BO for caml-list@inria.fr; Thu, 25 Jun 2009 15:14:15 +0000 Received: from ks300734.kimsufi.com ([91.121.65.225]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Jun 2009 15:14:15 +0000 Received: from sylvain by ks300734.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 25 Jun 2009 15:14:15 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: Mastering the garbage collector Date: Thu, 25 Jun 2009 15:14:00 +0000 (UTC) Message-ID: References: <4A439067.8070104@irisa.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ks300734.kimsufi.com User-Agent: slrn/pre1.0.0-2 (Linux) Sender: news X-Spam: no; 0.00; le-gall:01 irisa:01 -inline:01 garbage:01 garbage:01 wrote:01 data:02 compiling:02 allocated:02 root:04 notion:04 generally:04 size:95 intermediate:05 somewhere:06 On 25-06-2009, Tiphaine Turpin wrote: > Hi, > > I have difficulties with the garbage colloector. I have a program that > use a lot of memory to build a small result, before doing something > else. I expected all the memory but the result to be collected when > doing a full_major, but this is not the case. I have tried to > encapsulate all references to the large intermediate data in a function, > compiling with -inline 0, but it does not work. Any idea ? More > generally, is there a specification of the notion of root used by the > garbage collector somewhere ? > You need to do a "Gc.compact" to size down. A full_major will collect but I am not sure it will free allocated page. Regards, Sylvain Le Gall