Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: OCaml is broken
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] Re: multicore wish
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