memory leak

Joel Sherrill joel.sherrill at OARcorp.com
Tue Feb 11 15:06:34 UTC 2003



Stan wrote:
> 
> Hi,
> 
> How to detect memory leak ?
> At some point, my application is  freeze.
> STACK_CHECKER_ON is defined, but
> no message to appear.

This only checks at context switch time so if you blow the stack
too badly in between them, then nothing will be detected.

You could insert calls to check the stack in your task loops so
you are not depending on a context switch to occur.

If you can look at memory after it freezes, you can check stacks 
pretty easily by hand.  It should be fairly easy to write
a gdb macro to do this also.
 
> I don't use malloc/free.

That eliminates all that possible detection. :)

> Thanks.
> 
>         Stan .

-- 
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