Version française
Home     About     Download     Resources     Contact us    
Browse thread
Estimating the size of the ocaml community
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Olivier Andrieu <andrieu@i...>
Subject: Re: [Caml-list] Estimating the size of the ocaml community
 > Frédéric Gava [Fri, 4 Feb 2005]:
 > > AFAIK Marshal.{to,from}_channel isn't limited by the maximum
 > > string length.
 > >...
 > >    Olivier
 > 
 > OK. Right but you can not all the time used channels... For TCP/IP,
 > that is possible, but for low level libraries (as MPI, PVM, PUB
 > etc...) you need strings and you are blocked by this limitation
 > (except if you read the values from a file but in this case it is
 > not a fast solution).

If you're interfacing with a C library you have yet another option :
serialize to a malloc block. That's what these low level libraries
should use. 

,----[ intext.h ]
| CAMLextern void caml_output_value_to_malloc(value v, value flags,
|                                             /*out*/ char ** buf,
|                                             /*out*/ long * len);
| CAMLextern value caml_input_value_from_malloc(char * data, long ofs);
`----

-- 
   Olivier