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=0.9 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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 2055ABB84 for ; Mon, 12 Jan 2009 19:26:51 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.37,253,1231110000"; d="scan'208";a="22361116" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 12 Jan 2009 19:26:51 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id n0CIQoaF021310 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 12 Jan 2009 19:26:50 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvgCAJAZa0lQW+UCe2dsb2JhbACUEwEBFiIEvzmFbw X-IronPort-AV: E=Sophos;i="4.37,253,1231110000"; d="scan'208";a="22361115" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 12 Jan 2009 19:26:50 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LMRUs-0003iD-8u for caml-list@inria.fr; Mon, 12 Jan 2009 18:26:46 +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 ; Mon, 12 Jan 2009 18:26:46 +0000 Received: from sylvain by ks300734.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Jan 2009 18:26:46 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: memory usage Date: Mon, 12 Jan 2009 18:26:35 +0000 (UTC) Message-ID: References: <1231746106.4376.27.camel@john-laptop> <496B6FE3.1010403@bik-gmbh.de> <1231778664.4376.228.camel@john-laptop> <1231783292.4376.250.camel@john-laptop> 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/pre0.9.9-102 (Linux) Sender: news X-Miltered: at discorde with ID 496B8B6A.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; le-gall:01 ocaml:01 exited:01 stack:01 stack:01 terminate:01 data:02 exit:04 correctly:04 null:05 thread:06 thread:06 joined:93 stat:07 function:08 Can you make sure that all your function terminate and are joined (Thread.join). I think this will help to make sure that the thread exit and call thread_kill (see OCaml source code). If you take a look at thread_kill there is a function stat_free + set to NULL things called stack_low, stack_high... Maybe all the data you are seeing come from this... I am not sure that Thread.join will free anything, but it will help you to be sure that your thread has exited correctly. Regards, Sylvain Le Gall