From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 6B4CFBC8B for ; Fri, 4 Feb 2005 13:15:31 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j14CFUTx023584 for ; Fri, 4 Feb 2005 13:15:31 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA20358 for ; Fri, 4 Feb 2005 13:15:30 +0100 (MET) Received: from kraid.nerim.net (smtp-105-friday.nerim.net [62.4.16.105]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j14CFUBF023580 for ; Fri, 4 Feb 2005 13:15:30 +0100 Received: from localhost (karryall.dnsalias.org [62.4.18.180]) by kraid.nerim.net (Postfix) with ESMTP id 1A638418FB; Fri, 4 Feb 2005 13:15:29 +0100 (CET) Date: Fri, 04 Feb 2005 13:15:29 +0100 (CET) Message-Id: <20050204.131529.104031634.oandrieu@nerim.net> To: frederic.gava@wanadoo.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Estimating the size of the ocaml community From: Olivier Andrieu In-Reply-To: <005501c50aaa$b35d9560$0100a8c0@mshome.net> References: <002c01c50a98$84337a00$0100a8c0@mshome.net> <20050204.111102.71086746.oandrieu@nerim.net> <005501c50aaa$b35d9560$0100a8c0@mshome.net> X-Mailer: Mew version 4.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 42036762.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42036762.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 andrieu:01 andrieu:01 ijm:01 gava:01 afaik:01 interfacing:01 serialize:01 malloc:01 intext:01 malloc:01 flags:01 char:01 buf:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: > 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