Boost logo

Boost Users :

Subject: [Boost-users] boost interprocess - managed_shared_memory - min segment size
From: aidan mcgurn (a_mcgurn_at_[hidden])
Date: 2011-04-05 14:49:10

Hi, i was wondering what/is there a minimum segment size that can be passed in here: managed_shared_memory(create_only, segmentName, segment size) For example i have seen when i set this to say 30 (30 bytes), i get a segmentation error, not here but on the following line where i try to create the mutex: boost::shared_mutex *mtx = segment.find_or_construct<boost::shared_mutex>("mtx")(); The point been, its not thrown an exception inside managed_shared_memory. However if i set this to 500, then i do get an exception which i catch and print: boost::interprocess_exception::library_error - error_code = 2; native error = 0 Looking at the error codes in error_code_t, 2 = "other_error, // library generated error" So this isn't even a size_error which i can catch and try to resize with? (not sure why this happens then and not for 30 - library generated error code is unclear in this case) If i set this to 700, then it all works fine. So i'm a/ wondering whats going on here b/ is there a minimum segment size? thanks. /aidan

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at