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.0 required=5.0 tests=AWL 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 68C3FBC6B for ; Wed, 23 Jan 2008 17:46:16 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAANv9lkfAXQImh2dsb2JhbACQHgEBAQgKKZ1a X-IronPort-AV: E=Sophos;i="4.25,239,1199660400"; d="scan'208";a="6482562" Received: from discorde.inria.fr ([192.93.2.38]) by mail2-smtp-roc.national.inria.fr with ESMTP; 23 Jan 2008 17:46:16 +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 m0NGkFD3025979 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 23 Jan 2008 17:46:16 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAANv9lkfAbSoIn2dsb2JhbACQHgEBAQEBBgQGCQgYnVo X-IronPort-AV: E=Sophos;i="4.25,239,1199660400"; d="scan'208";a="7133370" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail1-smtp-roc.national.inria.fr with ESMTP; 23 Jan 2008 17:46:15 +0100 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from einhorn.in-berlin.de (localhost [127.0.0.1]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id m0NGkE4V001731 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 23 Jan 2008 17:46:14 +0100 Received: (from www-data@localhost) by einhorn.in-berlin.de (8.13.6/8.13.6/Submit) id m0NGkEOU001729 for caml-list@inria.fr; Wed, 23 Jan 2008 17:46:14 +0100 X-Authentication-Warning: einhorn.in-berlin.de: www-data set sender to oliver@first.in-berlin.de using -f Received: from dslb-088-073-070-229.pools.arcor-ip.net (dslb-088-073-070-229.pools.arcor-ip.net [88.73.70.229]) by webmail.in-berlin.de (IMP) with HTTP for ; Wed, 23 Jan 2008 17:46:14 +0100 Message-ID: <1201106774.47976f56aa4e0@webmail.in-berlin.de> Date: Wed, 23 Jan 2008 17:46:14 +0100 From: Oliver Bandel To: caml-list@inria.fr Subject: Freeing allocated C-memory by GC (destructors) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Miltered: at discorde with ID 47976F57.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bandel:01 in-berlin:01 allocating:01 ocaml:01 ocaml:01 freeing:98 oliver:01 oliver:01 functions:01 data:02 represented:02 allocated:02 allocated:02 representing:05 variable:06 Hello, after using some non-permanent allocating C-stuff together with OCaml, I think about going one step further and now have allocated memory from C represented as OCaml-variables (in the concrete example I have married some of my C-stuff that uses jpeglib to get information from picture-files, and now think about representing complete picture-data as OCaml-variables). So, I want to have the possibility to have malloced/calloced data avaliable in OCaml, and that the GC calls C-destructor- functions (using free(3)) when the values are of no use anymore. How to say the GC, which is the destructor-functions for a variable, which has been created? TIA, Oliver