Debugging PPPD Resource Leaks
Joel Sherrill
joel.sherrill at OARcorp.com
Sat Oct 6 15:47:12 UTC 2001
> Mike Siers wrote:
>
>
> Hi,
> I have a simple test program that should run forever but
> it stops functioning correctly after about 20 iterations.
> What is the best way to debug resource leaks? Do
> the following gdb commands still work correctly to display
> available Workspace and Heap memory?
>
> print *(Heap_Block *)_Workspace_Area->first
> print *((Region_Control
> *)_Region_Information->local_table[1])->Memory->first
This is insufficient. You can trace these chains fown
but this is only the first block
You might want to look at libc/mallocfreespace.c
and provide a similar entry to get all the information you can from
the underlying heap (# of used/free blocks and total used/free memory).
> The program is just trying to bring up and down a ppp link
> over a direct serial cable. It works about 20 times and then
> it can not successfully bring up the IP layer. What things can
> I look at to help determine if the network stack has run out
> of memory?
The stack has its own memory issues which might be a factor.
There is a routine to print out net stats which I don't remember
offhand which might be helpful.
> I am using the current snapshot. Any debugging hints/tips
> would be greatly appreciated.
>
> Thanks
> Mike Siers
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list