[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Date: Tue, 11 Feb 2003 17:47:30 -0800
- From: strauman at SLAC.Stanford.EDU (Till Straumann)
- Subject: memory leak
Joel Sherrill wrote:
> Stan wrote:
>>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.
You most likely _do_ use malloc/free [indirectly].
E.g. if you open a file and fail to close it, you
end up with a memory leak (because libio uses malloc/free).
Many system services use the heap extensively and hence you
create memory leaks if you don't properly release system
resources (+ the system itself might have memory
leaks, although probably not very aggressive ones).
> That eliminates all that possible detection. :)
>> Stan .
- memory leak
- From: zylog at club-internet.fr (Stan)
- memory leak
- From: joel.sherrill at OARcorp.com (Joel Sherrill)