id summary reporter owner description type status milestone component version severity resolution keywords cc 4066 Boost::Interprocess::vector only pushes back so many correct values before it always pushes 0. powerking89670@… Ion Gaztañaga "I was perusing the documentation on interprocess, and I decided to scale up the example a bit to make sure it would suit my purposes. {{{ #include //For getch #include #include #include #include #include using namespace boost::interprocess; //Define an STL compatible allocator of ints that allocates from the managed_shared_memory. //This allocator will allow placing containers in the segment typedef allocator ShmemAllocator; //Alias a vector that uses the previous STL-like allocator so that allocates //its values from the segment typedef boost::interprocess::vector MyVector; int main(int argc, char* argv[]) { struct shm_remove { shm_remove() { shared_memory_object::remove(""MySharedMemory""); } ~shm_remove(){ shared_memory_object::remove(""MySharedMemory""); } } remover; //Create a new segment with given name and size managed_shared_memory segment(create_only, ""MySharedMemory"", 80000); //Initialize shared memory STL-compatible allocator const ShmemAllocator alloc_inst (segment.get_segment_manager()); //Construct a vector named ""MyVector"" in shared memory with argument alloc_inst MyVector *myvector = segment.construct(""MyVector"")(alloc_inst); myvector->reserve(5000); for(int i = 0; i < 5000; i++) //Insert data in the vector myvector->push_back(5); for(unsigned int i=0; i < myvector->size(); i++) { printf(""%u: %u\n"", i+1, myvector[i]); } _getch(); return 0; } }}} However, when this code is build/run it outputs the correct value for a while and then suddenly the values switch to 0 or vary widely. Am I doing something incorrectly, or is this a problem with the lib?" Bugs closed Boost 1.43.0 interprocess Boost 1.42.0 Problem invalid