Markus Kohler(deleted)
|
Erroneous malloc() behaviour
|
Markus Kohler(deleted)
05/30/2011 9:07 AM
post86253
|
Erroneous malloc() behaviour
Hello!
This is probably a quite indefinite question, but does anyone know of erroneous malloc() behaviour in running QNX 6.3.x
on MPC8555E targets (compiler version and optimization flags seem to be irrelevant; I tried 2.95.3 and 3.3.5)?
I have the following issue:
When allocating two byte arrays (one directly after the other; size: 256 Bytes), malloc() sometimes returns the same
pointer address in the 2nd call as it has already returned in the 1st one. Hence, both array pointers actually point to
the same address.
The actual malloc() calls are located in a sub-function of a self-written shared library, invoked at runtime (.so). The
erroneous behaviour was detected by adding appropriate printf() calls directly afterwards, outputting the two pointer
adresses.
Could it have to do something with the shared library usage, or with a too small stack size due to nested sub-function
calls?
I would appreciate any ideas. I hope, this post does not lack any important information - if so: sorry for that.
Regards,
Markus
|
|
|