#354: Segfault in C code for RGB frames..
------------------------+---------------------------------------------------
Reporter: toots | Owner: admin
Type: Bugs | Status: new
Priority: 1 | Milestone: 1.0 beta
Component: Liquidsoap | Version: 0.9.2+svn
Keywords: | Mac: 1
Linux: 1 | Netbsd: 1
Other: 1 | Freebsd: 1
------------------------+---------------------------------------------------
Comment(by toots):
{{{
let create ?stride width height =
let stride =
match stride with
| Some v -> v
| None -> 4*width
in
let data =
Bigarray.Array1.create
Bigarray.int8_unsigned Bigarray.c_layout
(stride*height)
in
{
data = data;
width = width;
height = height;
stride = stride
}
}}}
{{{
enum caml_ba_managed {
CAML_BA_EXTERNAL = 0, /* Data is not allocated by Caml */
CAML_BA_MANAGED = 0x200, /* Data is allocated by Caml */
(...)
}}}
I wouldn't be surprised if Bigarrays create inside ocaml would be flaged
MANAGED and the memory manipulated by the gc.. We should then have
bigarrays whose memory is flagged EXTERNAL.
I am not entierly sure how to create a fresh bigarray from C yet,
however..
--
Ticket URL: <http://savonet.rastageeks.org/ticket/354#comment:9>
Savonet <http://savonet.rastageeks.org/>
Let's program our stream !
------------------------------------------------------------------------------
_______________________________________________
Savonet-trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-trac