Take a look at the implementation of the std::vector class on the problematic platform. Each implementation controls memory management in different ways (for example, some double the current allocated space when you add an object beyond the current size of the vector allocation). If your objects are large enough and / or you have a large number of records added to the vector, you can try to allocate outside the available (continuous) memory on the computer. If so, you need to look into the custom allocator for this vector.
If you store many large elements in a vector, you may want to look at another collection (for example, std::list ) or try to save pointers instead of real objects.
Zac howland
source share