0

I'm trying to use glowcode to track a C++ mem-leak issue in our app.

But first of the first, glowcode cannot track all the memory allocated from our app. It only tracks 300MB memory usage when TaskManager shows we're using 700MB;

I doubted that the lost memory is allocated by some 3rd-party dll(s), but it's hard to find it out.

Do you have any similar issues or any ideas about that? Thanks in advance.

EDIT: WOW! VMMap is a great tool, its timeline feature fits me well.

zaexage
  • 43
  • 1
  • 5
  • To track a memory leak, you usually want to look *only* at the memory used for data, not code (which is not what Task Manager shows). – Jerry Coffin Jan 06 '13 at 06:16
  • Use valgrind not task manager! – Alok Save Jan 06 '13 at 06:17
  • TaskManager shows how much memory the OS has allocated to the app, not how much memory the app is using out of that amount. Similar to the way that a vector has a size and a capacity that may or may not match. – Retired Ninja Jan 06 '13 at 06:47
  • When you lanch an application from [VMMap](http://technet.microsoft.com/en-us/sysinternals/dd535533) the app is instrumented to track individual memory allocations (HeapAlloc, VirtualAlloc, etc) along with the associated call stack. – Serg Jan 06 '13 at 07:44
  • well, the problem is our app's mem usage will keep go up to 1.5GB and crash for draining mem, But the glowcode still reports 300MB allocated mem. I seriously doubted the mem is consumed by physics dll, but no solid evidence. – zaexage Jan 06 '13 at 08:27
  • As the number difference is so big I think the primary issue here is glowcode failing to track real mem allocation. Alok: I heard aboud valgrind, but my colleague said it's linux only, is it available on windows recently? I will check it out. sergmat: glowcode can also show callstack on allocation and related info in realtime, but I will have a try on VMMap. – zaexage Jan 06 '13 at 08:39

1 Answers1

0

Well, it seems that VMMap is quite suited for the job, the timeline functionality is really a killer feature. I have sorted out our memleak problem with it. Thanks @sergmat!

As for Glowcode, it looks like that it only tracks heap-allocation, not VirtualAlloc-ed memory (which is shown in VMMap as `Private Data'), so that's why the figures did not match with Task-Manager.

For tracking stacktrace, VMMap takes quite a lot of memory for itself compared with Glowcode. But for a 8GB memory machine, it won't be a big issue.

zaexage
  • 43
  • 1
  • 5