Boost logo

Boost Users :

Subject: Re: [Boost-users] allocating shared memory fails beyond 8 GB
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-04-30 00:59:52

El 29/04/2014 23:23, vipin sachdeva escribió:
> It is error code 13; basically I would like to find out out beforehand
> how much maximum shared memory (using MemFree from /proc/meminfo, sysctl
> info etc) I can allocate on a machine and only make an allocation that
> big , and only allocate a segment of that size. Are there any other
> system variables I need to consider ? Thanks.

Is that value the errno value (get_native_error)? At least in linux (you
haven't tell us which OS you are using), errno 13 is EACCES (Permission
denied). ENOMEM is 12.

If you are referring to get_error_code(), then it's Interprocess'
out_of_memory_error (it comes from ENOMEM Posix value).

Maybe you don't have a contiguous page of a page of size, there are more
processes consuming pages, old shared memory created by shmget has not
been freed... According to POSIX ENOMEM can be returned if "the amount
of available physical memory is not sufficient to fill the request". Do
you have enough physical memory (not virtual) free?

Perhaps you could debug the Interprocess code until the shmget() call to
see if parameters are correctly passed to the OS. If those parameters
are correct, then it's absolutely OS-dependent.



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at