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 9A574BB84 for ; Mon, 24 Jul 2006 12:13:43 +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 k6OADgYk017783 for ; Mon, 24 Jul 2006 12:13:43 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA27307 for ; Mon, 24 Jul 2006 12:13:42 +0200 (MET DST) Received: from mallaury.nerim.net (smtp-101-monday.noc.nerim.net [62.4.17.101]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k6OADfpH017779 for ; Mon, 24 Jul 2006 12:13:42 +0200 Received: from karryall.dnsalias.org (karryall.dnsalias.org [213.41.240.180]) by mallaury.nerim.net (Postfix) with ESMTP id 141A64F3E6; Mon, 24 Jul 2006 12:13:35 +0200 (CEST) Received: by karryall.dnsalias.org (Postfix, from userid 500) id 45DF8596CF8; Mon, 24 Jul 2006 12:13:41 +0200 (CEST) From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17604.40277.128625.468452@karryall.dnsalias.org> Date: Mon, 24 Jul 2006 12:13:41 +0200 To: Richard Jones Cc: Jonathan Roewen , caml-list@inria.fr Subject: Re: [Caml-list] help with caml_stat_alloc In-Reply-To: <20060724085600.GB11739@furbychan.cocan.org> References: <73347253780-BeMail@beos> <20060724085600.GB11739@furbychan.cocan.org> X-Mailer: VM 7.19 under Emacs 21.4.1 X-Miltered: at concorde with ID 44C49D56.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44C49D55.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; andrieu:01 oandrieu:01 nerim:01 alloc:01 alloc:01 malloc:01 malloc:01 ocaml:01 2006:98 2006:98 heap:01 wrote:01 caml-list:01 exception:01 caml:02 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 Richard Jones [Monday 24 July 2006] : > > 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? caml_stat_alloc _is_ malloc, it's just that it raises the ocaml out-of-memory exception if malloc returns NULL.