Boost logo

Boost Users :

Subject: Re: [Boost-users] [Interprocess] Minimum allocation size for managed_shared_memorty
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2010-11-29 14:03:59


On 29/11/2010 17:08, Aditya Gadre wrote:
> On my machine, the page size is 4096 bytes. In general, is it advisable
> to allocate memory in multiples of the page size?
> Thanks,

We'll, if you need fixed allocation it does not matter. If you are going
to use dynamic allocation functions, if you don't allocate in multiples
of the page-size, you are going to waste memory, since no one can use
the the portions of the pagesize you don't fully map.

See:

http://www.boost.org/doc/libs/1_45_0/doc/html/interprocess/sharedmemorybetweenprocesses.html#interprocess.sharedmemorybetweenprocesses.mapped_region.mapped_region_mapping_problems

Best,

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net