[interprocess] Unmap resource of the object constructed from managed_mapped_file
Hi,
I have a managed_mapped_file and use it to dynamically construct lots of
interprocess::vector
El 22/12/2010 11:42, Ryan47@cgcg.com.tw escribió:
Hi,
I have a managed_mapped_file and use it to dynamically construct lots of
interprocess::vector
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
participants (2)
-
Ion Gaztañaga
-
Ryan47@cgcg.com.tw