From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 7B11ABB81 for ; Fri, 31 Dec 2004 12:14:23 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBVBENOo013853 for ; Fri, 31 Dec 2004 12:14:23 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA16127 for ; Fri, 31 Dec 2004 12:14:22 +0100 (MET) Received: from smtp-vbr14.xs4all.nl (smtp-vbr14.xs4all.nl [194.109.24.34]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBVBEMKm013850 for ; Fri, 31 Dec 2004 12:14:22 +0100 Received: from reddwarf.xs4all.nl (voge.xs4all.nl [213.84.6.60]) by smtp-vbr14.xs4all.nl (8.12.11/8.12.11) with SMTP id iBVBELdR054794 for ; Fri, 31 Dec 2004 12:14:22 +0100 (CET) (envelope-from lodewijk@reddwarf.xs4all.nl) Received: (qmail 32236 invoked from network); 31 Dec 2004 11:18:41 -0000 Received: from unknown (HELO ?192.168.3.65?) (192.168.3.65) by reddwarf.voge.xs4all.nl with SMTP; 31 Dec 2004 11:18:41 -0000 Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: <41D51D75.5010406@wanadoo.fr> References: <2D67CB0C-5907-11D9-B386-000A95A068A6@reddwarf.xs4all.nl> <41D51D75.5010406@wanadoo.fr> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <1EA5D7CE-5B1D-11D9-9722-000A95A068A6@reddwarf.xs4all.nl> Content-Transfer-Encoding: 7bit From: Lodewijk Voge Subject: Re: [Caml-list] memory leak in C snippet? Date: Fri, 31 Dec 2004 12:14:21 +0100 To: caml-list@inria.fr X-Mailer: Apple Mail (2.619) X-Virus-Scanned: by XS4ALL Virus Scanner X-Miltered: at nez-perce with ID 41D5348F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41D5348E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 matthieu:01 wrote:01 ocaml:01 blocs:01 alloc:01 alloc:01 ocaml:01 bug:01 tuple:02 string:03 perhaps:03 let:03 allocate:06 manual:07 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.0 X-Spam-Level: On 31-dec-04, at 10:35, Matthieu Brucher wrote: > I'm not very into Ocaml at the moment, so perhaps what I will say > isn't relevant, but you seem to allocate 2 memory blocs in your > function (alloc_string and alloc_tuple), but where do you free this > memory ? Does OCaml take charge of this or do you still have to do it > yourself as it is in a C function ? no, ocaml is supposed to do this. if it didn't, the daemon wouldn't last an hour, let alone a week :) I think I'll file this as a bug and see what the gurus have to say about it. I'm staring myself silly at the code snippet and the manual and it's not helping. Lodewijk