Any tool to find size of memory allocated dynamically using malloc/realloc?

后端 未结 4 1759
时光说笑
时光说笑 2021-01-23 19:44

I have a MS-Visual Studio 2005 workspace having all c code. This application(exe) allocates memory dynamically from heap using malloc and realloc. I want to calculate the maximu

4条回答
  •  春和景丽
    2021-01-23 20:18

    Memory Validator can do this.

    There are several different reports that you will find useful:

    • Running Totals. This is presented as a dialog box and provides current, cumulative and total values for each of the main memory allocator (C runtime, HeapAlloc, LocalAlloc, GlobalAlloc, CoTaskMemAlloc, etc).

    • Objects. This is one of the main tabs and displays object type, size, count, cumulative. Also subtabs for per-thread and per-dll values.

    • Sizes. This is one of the main tabs and displays size, count, cumulative. Also subtabs for per-thread and per-dll values.

    • Virtual. This displays a graphical view of memory (one pixel == one page of memory) and has subtabs showing detailed virtual memory data for virtual memory pages and virtual memory paragraphs.

    Full disclosure: I am part of the Memory Validator team.

提交回复
热议问题