[Interprocess] Minimal size of a managed_shared_memory
Hello, A managed_shared_memory is a typedef for a basic_managed_shared_memory using rbtree_best_fit as allocation algorithm. In the documentation : http://www.boost.org/doc/libs/1_53_0/doc/html/interprocess/memory_algorithms... It is said at the and of the page : "In most 32 systems with 8 byte alignment the minimum size of a block is 24 byte". I am on Windows XP SP3 32 bits. The alignement is 8 byte. But if I create a managed_shared_memory with a size lesser than 120 bytes, my app crashes. This value comes from several get_min_size function, the deepest being in the rbtree_best_fit class. So I wonder which value we can grant to the documentation above. How are the 120 bytes used ?
El 24/06/2013 1:22, Oodini escribió:
Hello,
A managed_shared_memory is a typedef for a basic_managed_shared_memory using rbtree_best_fit as allocation algorithm.
In the documentation :
http://www.boost.org/doc/libs/1_53_0/doc/html/interprocess/memory_algorithms...
It is said at the and of the page : "In most 32 systems with 8 byte alignment the minimum size of a block is 24 byte".
I am on Windows XP SP3 32 bits. The alignement is 8 byte. But if I create a managed_shared_memory with a size lesser than 120 bytes, my app crashes. This value comes from several get_min_size function, the deepest being in the rbtree_best_fit class.
The memory algorithm can't allocate less than 24 bytes, but the managed shared memory class has internal members that need memory (say, the internal mutex, internal container that points to named allocations, etc. Those members also go to the segment. Best, Ion
participants (2)
-
Ion Gaztañaga
-
Oodini