Memory leaks from Purifier

S

Ship1

Hi,
How do i debug the memory leaks given below which I get using the
Rationals Purifier for a C++ code.

Summary of all memory leaks... {121604 bytes, 7 blocks}
[W] MLK: Memory leak of 65536 bytes from 2 blocks allocated in
BinDataPrep.exe
Distribution of leaked blocks
Allocation location
VirtualAlloc [KERNEL32.dll]
??? [BinDataPrep.exe ip=0x004125e3]
??? [BinDataPrep.exe ip=0x004122b2]
??? [BinDataPrep.exe ip=0x0041177e]
??? [BinDataPrep.exe ip=0x00427059]
[W] MLK: Memory leak of 32768 bytes from 1 block allocated in
BinDataPrep.exe
Distribution of leaked blocks
Allocation location
??? [BinDataPrep.exe ip=0x00427059]
[W] MLK: Memory leak of 16836 bytes from 1 block allocated in
BinDataPrep.exe
[W] MLK: Memory leak of 4096 bytes from 1 block allocated in
BinDataPrep.exe
 
L

Larry Brasfield

Ship1 said:
Hi,
How do i debug the memory leaks given below which I get using the
Rationals Purifier for a C++ code.

[ Cut Purify blat showing allocation IP for leaked blocks.]

Cause your build to generate a map. The map can
be used to assign each instruction pointer (aka 'IP')
value to a particular function. With your program
in the debugger, in 'view assembly' mode, go to the
offending function and find out which statement best
corresponds to the exact IP value. Then, somehow,
(preferably with a review of your design approach
and understanding of memory management issues),
decide why each of those allocations results in no
corresponding release of the allocated memory.
You will, in effect, need a free or delete for each
malloc or new executed in your code. This may
mean correction of a destructor or an operator=
implementation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

pthread memory leaks 15
memory manager to prevent memory leaks 4
strstream Memory Leak 5
Memory leaks 2
Strstreambuf memory leak 4
Memory Leaks and Heapy 0
Zipimport leaks memory? 0
Why memory leaks? 4

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top