Boost logo

Boost Users :

Subject: [Boost-users] Creating a managed_mapped_file
From: Eli Zakashansky (Eli.Zakashansky_at_[hidden])
Date: 2009-07-19 11:10:42


Hello,

I would like to create a managed_mapped_file which should contain a certain number of elements[n] of a certain size [k], therefore the required size which I would like to use is n*k (size of element * number of elements).
But when the file is created [new bip::managed_mapped_file (bip::create_only, fileName, n*k);] besides the elements which I would like to placed in this file, a segment manager<http://www.boost.org/doc/libs/1_39_0/doc/html/interprocess/architecture.html#interprocess.architecture.architecture_algorithm_to_managed.architecture_segment_manager> is also placed there and occupies an uncertain space [http://www.boost.org/doc/libs/1_39_0/doc/html/interprocess/architecture.html#interprocess.architecture.architecture_algorithm_to_managed]. I would like to know how much memory (size of file) shall I require in the C-tor so that my file will have enough space for n elements of size k, and be as compact as possible.

Thanks in advance,
Eli.



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