From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 6C58DBB84 for ; Mon, 24 Jul 2006 10:56:08 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k6O8u7WH004639 for ; Mon, 24 Jul 2006 10:56:08 +0200 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 KAA26166 for ; Mon, 24 Jul 2006 10:56:07 +0200 (MET DST) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k6O8u5le004381 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 24 Jul 2006 10:56:07 +0200 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1G4wEK-0005Bl-00; Mon, 24 Jul 2006 09:56:00 +0100 Date: Mon, 24 Jul 2006 09:56:00 +0100 To: Jonathan Roewen Cc: caml-list@inria.fr Subject: Re: [Caml-list] help with caml_stat_alloc Message-ID: <20060724085600.GB11739@furbychan.cocan.org> References: <73347253780-BeMail@beos> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <73347253780-BeMail@beos> User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at concorde with ID 44C48B27.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44C48B25.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; alloc:01 alloc:01 malloc:01 pointers:01 notepad:01 2006:98 heap:01 wrote:01 caml-list:01 functions:01 caml:02 caml:02 external:02 fix:04 jul:04 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Mon, Jul 24, 2006 at 12:50:32AM -0700, Jonathan Roewen wrote: > I'm trying to allocate some memory outside of the caml heap, and I > think caml_stat_alloc is the right function to use. Anyways, it's > generating seg-faults, so I'm hoping someone can help me fix my > implementation. What was wrong with malloc? Have a look at ocamlode (http://merjis.com/developers/ocamlode), file ode_c.c for some functions which wrap external pointers in custom blocks. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com