Availability of netshm/POSIX shared memory under Ubuntu 9.10
Johan Mazel <[email protected]> Mon, 15 Mar 2010 18:33:00 +0100
| Newsgroups | gmane.comp.lang.ocaml.lib.net.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi
I'm trying to use ocamlnet to access to POSIX shared memory.
I wrote this little piece of code:
let _ =
Printf.printf("Test shared memory\n");
if (Netsys.have_posix_shm () = false) then
Printf.printf("No POSIX SHM\n")
else
(
Printf.printf("POSIX SHM OK\n");
)
It is displaying me "No POSIX SHM".
I also tried to run some code like :
let my_shm_name = `POSIX "my_shm" in
let sd = Netshm.open_shm my_shm_name [Unix.O_CREAT; Unix.O_RDWR] 0o666
in
The result is an error:
Fatal error: exception Invalid_argument("Netsys.shm_open not available")
I am running this code on a Ubuntu 9.10 64 bits.
This page "
http://manpages.ubuntu.com/manpages/karmic/man7/shm_overview.7.html"
specifies that "POSIX shared memory is supported since Linux 2.4 and glibc
2.2."
I do not see any reason why I obtain this behaviour.
Thanks in advance for your time.
Regards.
Johan Mazel
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ocamlnet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel