Mail Archives: djgpp/1998/01/13/18:36:00
One of my programs keep crashing on realloc() and I cannot find the
reason. I am allocating and reallocating some million times and somehow
some pointers in the program which were valid becomes invalid, usually
having a value of 0x09000000). I have tried many things (like using one
of DJ's malloc()'s, or compiling under linux with ElectricFence) to
catch the error but without success. So for debugging I can try to catch
the invalid pointers.
Is there any way to check a pointer for validity before dereferencing
it?
Andras
- Raw text -