Boost logo

Boost Users :

Subject: Re: [Boost-users] [interprocess] Unmap resource of the object constructed from managed_mapped_file
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2010-12-22 13:19:56


El 22/12/2010 11:42, Ryan47_at_[hidden] escribió:
> Hi,
>
> I have a managed_mapped_file and use it to dynamically construct lots of
>
> interprocess::vector<size_t> objects(all the objects and elements are
> resided
>
> in the mapped file). Now I'm looking for a way to keep the run-time memory
>
> consumption below a certain amount. Is it possible to unmap the resource
>
> of the vector object?
>
> Although all the resources would be freed when the managed_mapped_file
> is destroyed,
>
> but the cost of highly frequently mapping/un-mapping seems too expensive
> for my purpose.
>
> Is there any way to workaround this? Any suggestion is welcome.
>
> Thanks in advance.

If you want to lower memory usage, you need to put things in the file,
which is what unmapping does. i don't think you have more options that
this, other than trying to reduce your mapped file size / vector count.

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