English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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.