Re: Finding memory leak, walking the heap?
- From: Bruce Stephens <bruce+usenet@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 20 Feb 2008 22:36:00 +0000
"Ed J" <jed@xxxxxxxxxxx> writes:
[...]
Essentially, I'm looking for the ability to do something like this:
long bytes_allocated = heap_space_used();
... run code here that shouldn't grow the heap
if (bytes_allocated != heap_space_used())
printf( "I found a leak");
mallinfo. You might also want to try valgrind. Actually, you almost
surely want to try valgrind. (Presuming you're using an architecture
supported by valgrind, of course.)
.
- References:
- Finding memory leak, walking the heap?
- From: Ed J
- Finding memory leak, walking the heap?
- Prev by Date: Re: Finding memory leak, walking the heap?
- Next by Date: Re: Finding memory leak, walking the heap?
- Previous by thread: Re: Finding memory leak, walking the heap?
- Next by thread: Re: Finding memory leak, walking the heap?
- Index(es):
Relevant Pages
|