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 17:48:28

El 30/04/2014 23:14, vipin sachdeva escribió:
> Thanks for your reply; I am using Linux on x86_64 and the
> get_native_error was actually 12, get_error_code was 13. So I am running
> out of physical memory; so it is not possible to limit the
> managed_xsi_shared_memory by the amount of free virtual memory (your
> reply seems to imply that I am constrained by the free physical memory ?

I don't know what Linux does with this. In some OSs it might be limited
by physical + swap space. In Linux, SHM_NORESERVE flag suggests that
swap space is needed:

SHM_NORESERVE (since Linux 2.6.15)
This flag serves the same purpose as the mmap(2) MAP_NORESERVE flag. Do
not reserve swap space for this segment. When swap space is reserved,
one has the guarantee that it is possible to modify the segment. When
swap space is not reserved one might get SIGSEGV upon a write if no
physical memory is available. See also the discussion of the file
/proc/sys/vm/overcommit_memory in proc(5)

So maybe you could increase swap space. The OS needs to initialize
(shared memory is zeroed) and maintain data somewhere.



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