Dominik Sadnik sent the indented text:
>
> Does anybody know a siutable debugging tool for 'malloc' - errors ???
> (especially for DIGITAL Unix...)
Hi Dominik,
I have run into 'ALLOCATE' errors on DIGITAL Unix -- if this is what
you mean, I found it helpful to use 'dbx' to examine the args to
ALLOCATE before the problematic call. Also, the system doesn't
translate the error codes into English unless your code crashes, so
you may consider removing the status optional arg from your call so
that it aborts the code.
Finally, I have found it necessary to explicitly DEALLOCATE an array
even when the ALLOCATE fails, in order to free memory. I consider
this a compiler bug since I believe the standard says that when an
ALLOCATE fails, the array should already be in a deallocated state. I
reported it to them many moons ago but never heard anything back.
This can cause trouble when you try to allocate an array, fail due to
lack of sufficient memory, and then back the request down repeatedly
until it succeeds.
I imagine 'dbx' would be the right tool even if you really mean the C
function malloc().
HTH,
John
--
John Jeffrey Venier, B.A., M.Stat. Programmer Analyst II
Section of Computer Science Department of Biomathematics
The University of Texas M. D. Anderson Cancer Center, Houston, Texas
[log in to unmask] +1 (713) 792-2622
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|