Version française
Home     About     Download     Resources     Contact us    
Browse thread
Bigarrays and blocking_section..
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <alain@f...>
Subject: Re: [Caml-list] Bigarrays and blocking_section..
On 5/25/2010 6:25 PM, Romain Beauxis wrote:
> My understanding is that after the line  "frame_of_value(_rgb,&rgb);", the C
> object rgb only contains ints and a pointer to a block of memory allocated by
> malloc.

Did you allocated the C array yourself with malloc? (And then used 
alloc_bigarray to wrap it as an OCaml bigarray.)  Otherwise, if you 
created the bigarray from OCaml code, you need to keep the bigarray live
with some GC root, or the memory for the array can be released.


Alain