I have a code in Which the call to push_back fails for me . The mdb gives me the following clue .
::dem malloc+0x49~
malloc+0x49~ == malloc+0x49~
::dem __1cIallocate4CpnGrnc_JO__6FipTA_3_+0x2a~
__1cIallocate4CpnGrnc_JO__6FipTA_3_+0x2a~ == __type_0*allocate
::dem __1cJallocator4CpnGrnc_JO__Iallocate6MI_p1_+0x20~
__1cJallocator4CpnGrnc_JO__Iallocate6MI_p1_+0x20~ == rnc_JO**allocator::allocate
::dem __1cGvector4CpnGrnc_JO__Kinsert_aux6Mp1rk1_v_+0xac
__1cGvector4CpnGrnc_JO__Kinsert_aux6Mp1rk1_v_+0xac == void vector::insert_aux
::dem __1cGvector4CpnGrnc_JO__Jpush_back6Mrk1_v_+0x4e
__1cGvector4CpnGrnc_JO__Jpush_back6Mrk1_v_+0x4e == void vector::push_back
::dem __1cIallocate4CpnGrnc_JO__6FipTA_3_+0x2a
__1cIallocate4CpnGrnc_JO__6FipTA_3_+0x2a == __type_0*allocate
::dem __1cGvector4CpnGrnc_JO__Jpush_back6Mrk1_v_+0x4e
__1cGvector4CpnGrnc_JO__Jpush_back6Mrk1_v_+0x4e == void vector::push_back`
I dont know How can this be corrected ?. What i know that there is an allocated space Which is actually bigger than the vector size . If that space is utilised it will reassign and copy all data to second location.
What i also know that vector macx_size is a very large value and this should not fail for my code as i am not inserting so many values.
Can you let me know What shoould i be debugging for?
One way to check is to monitor the free memory on your system together with the memory that your application is using.