Malloc problem
Leon Pollak
leonp at plris.com
Thu Oct 22 17:11:26 UTC 2009
Hello, all.
My 4.8.0 based rather big application at some (rather deep) point attempts to
allocate two 8-byte chunks of memory, one after another (operator 'new' in
C++). This is some 10001-th malloc done....:-)
To my greatest possible surprise I see that both pointers receive the same
address! (I am far from being out of memory).
Tracing with the debugger, I see that
- _Heap_Block_allocate allocates the same address all the time I call it;
- 'the_heap' content remains the same except the stats structure;
- stats->free_blocks crosses the zero value and becomes negative(?!). Also
some 2-3 other counters in stats change.
As I do not believe that this libcsupport code does not work, I search for my
error, but I am totally disoriented where to look for, as the first malloc (of
these two) works fine....
So, any hint about where to look will be highly appreciated...
--
Leon
More information about the users
mailing list