Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2010-05-26 (06:00)
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.