Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] help with caml_stat_alloc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] help with caml_stat_alloc
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