* [Caml-list] Attn: Development Editor, Latest OCaml Weekly News
@ 2023-03-28 7:21 Alan Schmitt
2023-04-03 1:49 ` [Caml-list] Could the Marshal module from the stdlib support marshal to/from a Char Bigarray? Francois Berenger
0 siblings, 1 reply; 2+ messages in thread
From: Alan Schmitt @ 2023-03-28 7:21 UTC (permalink / raw)
To: lwn, cwn, caml-list
[-- Attachment #1: Type: text/html, Size: 33522 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Caml-list] Could the Marshal module from the stdlib support marshal to/from a Char Bigarray?
2023-03-28 7:21 [Caml-list] Attn: Development Editor, Latest OCaml Weekly News Alan Schmitt
@ 2023-04-03 1:49 ` Francois Berenger
0 siblings, 0 replies; 2+ messages in thread
From: Francois Berenger @ 2023-04-03 1:49 UTC (permalink / raw)
To: caml-list
Dear list,
I posted about this on discuss.ocaml.org, but strangely there is no
feedback at all.
https://discuss.ocaml.org/t/could-the-marshal-module-from-the-stdlib-support-marshal-to-from-a-char-bigarray/11831/1
---
That would be a useful feature, since memmapped bigarrays are the de
facto shm
on Unix-likes for multi process programs.
When marshalling, we will need to be able to pass an offset into the
bigarray buffer.
The function should return how many bytes were written.
Probably, the current Marshal.to_buffer has the right interface.
I think, the current Marshal.from_bytes does not have the right
interface, the length
that was read from the (future) bigarray buffer should also be returned.
Thanks,
F.
PS: currently in user-space I can marshal to a string then copy that
string into the bigarray; but this involves unnecessary data copy and
shms are meant to be used in a high performance setting…
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-03 1:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 7:21 [Caml-list] Attn: Development Editor, Latest OCaml Weekly News Alan Schmitt
2023-04-03 1:49 ` [Caml-list] Could the Marshal module from the stdlib support marshal to/from a Char Bigarray? Francois Berenger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox