From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 4FA03BC37 for ; Mon, 28 Dec 2009 19:05:10 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8BAPOBOEvUGyoGkWdsb2JhbACYeYJIAQEBAQkLCgcTA7l5hDME X-IronPort-AV: E=Sophos;i="4.47,463,1257116400"; d="scan'208";a="39432163" Received: from smtp6-g21.free.fr ([212.27.42.6]) by mail2-smtp-roc.national.inria.fr with ESMTP; 28 Dec 2009 19:05:09 +0100 Received: from smtp6-g21.free.fr (localhost [127.0.0.1]) by smtp6-g21.free.fr (Postfix) with ESMTP id 48127E0819A; Mon, 28 Dec 2009 19:05:03 +0100 (CET) Received: from [192.168.1.3] (che78-2-82-237-71-191.fbx.proxad.net [82.237.71.191]) by smtp6-g21.free.fr (Postfix) with ESMTP id 59C29E08176; Mon, 28 Dec 2009 19:05:01 +0100 (CET) Message-ID: <4B38F34D.3020503@inria.fr> Date: Mon, 28 Dec 2009 19:05:01 +0100 From: Xavier Leroy User-Agent: Thunderbird 2.0.0.23 (X11/20091009) MIME-Version: 1.0 To: Gerd Stolpmann Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: multicore wish References: <4B2D2BC1.6020204@msu.edu> <200912221912.51017.jon@ffconsultancy.com> <87r5qk5x1j.fsf@frosties.localdomain> <200912241706.51917.jon@ffconsultancy.com> <87bphkk2ke.fsf@frosties.localdomain> <1262003315.32602.6.camel@flake.lan.gerd-stolpmann.de> In-Reply-To: <1262003315.32602.6.camel@flake.lan.gerd-stolpmann.de> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; gerd:01 stolpmann:01 mli:01 hash:01 hash:01 ocaml:01 run-time:01 well-formed:01 polymorphic:01 polymorphic:01 wrote:01 heap:01 caml-list:01 functions:01 strings:01 Gerd Stolpmann wrote: > It works with all types: > > https://godirepo.camlcity.org/svn/lib-ocamlnet2/trunk/code/src/netsys/netsys_mem.mli > > look for init_value. It's non-released code yet. > > However, there are some problems: Values outside the heap do not support > the polymorphic comparison and hash functions. That's a hard limitation, > e.g. you cannot even compare two strings, or build a hash table with > strings as keys. That limits the usefulness of shared memory. In OCaml 3.11 and later, you can call caml_page_table_add(In_static_area, start, end) to inform the run-time system that the address range [start, end) contains well-formed Caml data that polymorphic primitives can safely work on. This should solve your problem. - Xavier Leroy