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=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 E0F08BBAF for ; Sat, 26 Jul 2008 21:15:23 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApYCAAwVi0jRVYC/emdsb2JhbACSC0MBAQ4iA5YwhUw X-IronPort-AV: E=Sophos;i="4.31,256,1215381600"; d="scan'208";a="13487180" Received: from fk-out-0910.google.com ([209.85.128.191]) by mail2-smtp-roc.national.inria.fr with ESMTP; 26 Jul 2008 21:15:23 +0200 Received: by fk-out-0910.google.com with SMTP id k31so3334122fkk.11 for ; Sat, 26 Jul 2008 12:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:content-transfer-encoding :content-disposition:x-google-sender-auth; bh=puA80p/6g608SoNk8vX4YKkhI/eTGeV7r+bkxFGz/yM=; b=g/Ok89huWYlvsthxYI3semLzyDl4YzIYhzqJcU12hSR1kSWixDsloSFwgAueRh9ksR wbroAb/JhoEtsdLitF2cGCdOWUzkl1/PFAhmyKdDcRXPuPs+I5I4lMLHTcL0OXtriILF OLkqpeQ8i29vmq/cDi0u2xdLp5vYX61k9ZqP0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=A04YufTIZ5xCUPZ/k8bGo6YR/iM7m9a7aadJKHJuZmCE5S6HzGXYHedIkXlmJgA4sx Fg8wna6bpFuDdmrJ0ic/0gJz1lGMMnq7UHnWiC1+rolP02OFVuvna8UVfEPXvwncy54o EAggUPmjDCrUGj7zttUEwIXz0m6BMcTT+sO4c= Received: by 10.180.248.10 with SMTP id v10mr713645bkh.21.1217099723092; Sat, 26 Jul 2008 12:15:23 -0700 (PDT) Received: by 10.180.233.8 with HTTP; Sat, 26 Jul 2008 12:15:23 -0700 (PDT) Message-ID: Date: Sat, 26 Jul 2008 15:15:23 -0400 From: "Jean Krivine" Sender: jean.krivine@gmail.com To: caml-list@yquem.inria.fr Subject: Manually triggering garbage collection MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: ff6bfd8fc47d6701 X-Spam: no; 0.00; krivine:01 krivine:01 ocaml:01 hms:98 garbage:01 computation:01 arbitrary:02 data:02 simulation:05 rational:06 written:07 structure:07 manually:08 memory:09 memory:09 Dear list, I am running a memory intensive stochastic simulator written in ocaml. After initialization of the data structure (which eats up a lot of memory but that's normal) I observe a memory leak during the simulation which should not be there. I noticed that if I run Gc.major() every n computation events after initialization (I can make n vary), then there is no more memory leak (the memory the process is using is constant). So my question is the following: Is there a rational way to detect I should call for Gc.Major()? (for the moment I am triggering it every n events which is arbitrary) Thank you very much Jean