How to determine which C / C ++ objects use the most memory

I have a mixed mode application (managed and native) that has a lot of memory. I already found out that most of the memory is allocated by its own code. I'm not talking about a memory leak, but about the high memory consumption that occurs very early after the program starts, and then is relatively stable.

Do you know of any tool showing which C / C ++ objects use the most memory? I have already tried DebugDiag 1.1 and SoftwareVerify Memory Validator, but both tools do not provide enough information to identify C / C ++ objects.

Hello

Franc

+3
source share
2 answers

AQTime memory profiler works well for this. This is one of the few profilers I have tried that processes both native and managed code using the same profiler, including mixed-mode assembly support.

+2
source

Can a more "hardcore" approach be proposed?

WinDbg Team! heap can display a lot of important information about the native heap. follow these steps:

a. launch GFlags, go to the “Image File” tab, enter the process name and click the tab.

B. Click "Enable Page Heap" and "Create User Stack Trace Database" and click OK.

C. start your process.

. .

: , , . , , , GFlags .

WinDbg . Microsoft. .symfix, .reload/f, WinDbg Microsoft ( ).

, , :

.! heap -stat -

. . , , , .

.! heap -stat -h "heap handle" - . , .

. ! heap -flt s "size", .

.! heap -p -a "UserPtr" ( ). , " " GFlags.

, .

B.T.W

Windows, .

, , , :) .

+2

Source: https://habr.com/ru/post/1721231/


All Articles