CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2009

    Creating a boost’s managed_mapped_file

    Hi all,

    I am trying to create a (fixed size) managed_mapped_file for storing a table. The table contains a certain number of elements[n] of a certain size [k] (therefore table’s size is n*k) the required size which I would like to use is n*k (size of element * number of elements).
    When boost’s managed file is created [new bip::managed_mapped_file (bip::create_only, fileName, n*k);] besides the elements which I would like to place in this file, boost’s segment manager is also placed there and occupies space of uncertain size. [http://www.boost.org/doc/libs/1%5F39...%5Fmanaged%5D]. 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.
    The trivial/none-elegant way to solve this is to allocate 10% memory more than I need on the disk, from functionality point of view this works but I hate it.
    I already asked this question in a few other places but none answered me. Please advise.

    10x in advance.

  2. #2
    Join Date
    Aug 2009

    Re: Creating a boost’s managed_mapped_file


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.