Re: Availability of netshm/POSIX shared memory under Ubuntu 9.10
Johan Mazel <[email protected]> Tue, 16 Mar 2010 10:14:16 +0100
| Newsgroups | gmane.comp.lang.ocaml.lib.net.devel |
|---|---|
| Message-ID | <[email protected]> |
2010/3/15 Gerd Stolpmann <[email protected]> > On Mo, 2010-03-15 at 18:33 +0100, Johan Mazel wrote: > > 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 > > Where did you get your ocamlnet package from? Apparently, this is a > configuration issue. I'm developing on Ubuntu 9.10 and posix shm is > definitely there. Problems can arise when headers were missing at build > time. > > Gerd > Hi I got the packages from the default Ubuntu repositories. Is there any way to check their correctness ? I added some custom repositories to access the updates of a couple of software not included in the official repositories. 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