Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004987OCamlotherlibspublic2010-02-26 21:472012-06-21 20:16
Assigned To 
PlatformOSOS Version
Product Version3.11.2 
Target VersionFixed in Version 
Summary0004987: caml/bigarray.h should export more
DescriptionFor libfuse-ocaml bindings I need to pass a buffer to a callback to ocaml. The complication is that, since the buffer is part of a larger request, it is in the middle of an allocated chunk of memory. Luckily ocaml can already handle this case nicely in the form of Bigarrays. In ocaml using "Bigarray.Array1.sub full_request offset length" I can create a subset of the full array without having to copy the data.

But this can not be used in C stubs as caml/bigarray.h does not export the API for proxy objects or the function to create sub arrays. For my use case it would be enough to add

   CAMLprim value caml_ba_sub(value vb, value vofs, value vlen);

to caml/bigarray.h. But for completness the proxy struct should probably be exported as well as a helper function to savely free a bigarray (in case of Bigarrays not under GC control).

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2010-02-26 21:47 goswin New Issue
2011-06-01 14:32 doligez Status new => acknowledged
2012-06-21 20:16 frisch Category OCaml general => OCaml otherlibs
2017-02-23 16:42 doligez Category OCaml otherlibs => otherlibs

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker