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_NEUTRAL autolearn=disabled version=3.1.3 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 C6C42BC6B for ; Wed, 7 Nov 2007 10:13:27 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAO4QMUfRVZKwmGdsb2JhbACOewEBAQEHBAYRFg X-IronPort-AV: E=Sophos;i="4.21,382,1188770400"; d="scan'208";a="19022149" Received: from wa-out-1112.google.com ([209.85.146.176]) by mail4-smtp-sop.national.inria.fr with ESMTP; 07 Nov 2007 10:13:27 +0100 Received: by wa-out-1112.google.com with SMTP id k17so2855241waf for ; Wed, 07 Nov 2007 01:13:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Xj4k3y7v1gSuCGd0afN7FHrffJRF7oOywxPgwr9oYcY=; b=ZtbA0ZYkaiqt2AGRQhV6jgLMzGzxDfG8f+lG1XBqfWCCgi13tnXZ4YzNKsW7L8ZrfBNE+QrJJTrTCK1maUAC3qTjU6TD5/q1duVj/664NUhn1ns2FNMAzIVuLmlbDTL1MWw9aZAG//r/6aLYtHZPlk3Ksr4hLGmBfe3HnC7s1QM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WrHfT8w5Sq9xCCojBOcCZC/OzhEutb6e5dKzX6K4RHVX9O93MinFgSCiffCAleGFyYMOmuP7+S5EdEDM1S6DXVmPzXFN6GGi+FxPfvIqDb+CWDxd3QChYkWZdZI62kGy5KSbVO8Mm3K07ffYhSvegWWL14caXsAx+vPrsKP/7T0= Received: by 10.114.176.1 with SMTP id y1mr7270489wae.1194426806102; Wed, 07 Nov 2007 01:13:26 -0800 (PST) Received: by 10.114.13.16 with HTTP; Wed, 7 Nov 2007 01:13:26 -0800 (PST) Message-ID: <6f9f8f4a0711070113w636ff577ib1f39adb76a53539@mail.gmail.com> Date: Wed, 7 Nov 2007 10:13:26 +0100 From: "Loup Vaillant" To: "Markus Mottl" Subject: Re: [Caml-list] The GC is not collecting... my mistake? Cc: "Caml mailing list" , ocaml-users@janestcapital.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6f9f8f4a0711060451g1219a880gd711d997043b016@mail.gmail.com> X-Spam: no; 0.00; markus:01 mottl:01 markus:01 mottl:01 ocaml:01 ocaml:01 disposed:98 imho:01 wrote:01 caml-list:01 tuples:01 short:01 tuple:02 tuple:02 snip:02 2007/11/6, Markus Mottl : > On 11/6/07, Loup Vaillant wrote: > > I thought the GC could collect the first values of my streams when the > > program don't need them any more, but it doesn't seem to be the case. > > Unfortunately, I was unable to reduce my problem to a proper minimum > > example, so I send it all. > > Funny, my colleagues and I are also currently investigating a space > leak in OCaml. Here is a short example: > > (* snip *) > > Obviously, OCaml does not reclaim the tuple during the allocation loop > even though it could (and IMHO should). This can introduce > substantial space leaks as happened to us. Ouch. I wonder if this problem is related to mine (there are tuples in my code). If so, a non disposed tuple may prevent the disposal of my entire stream... (Unless I Did make a mistake about the space complexity of my program.) Thank you, Loup