内存大小匹配 !heap -s 出来的 和 !address 大小配不上
C/C++本地代码调试
内存大小匹配 !heap -s 出来的 和 !address 大小配不上
20785818
2013-10-11, 09:39 上午
!address:
-------------------- Usage SUMMARY --------------------------
TotSize ( KB) Pct(Tots) Pct(Busy) Usage
40cbb000 ( 1061612) : 50.62% 68.53% : RegionUsageIsVAD
21710000 ( 547904) : 26.13% 00.00% : RegionUsageFree
3c000 ( 240) : 00.01% 00.02% : RegionUsageImage
59c000 ( 5744) : 00.27% 00.37% : RegionUsageStack
0 ( 0) : 00.00% 00.00% : RegionUsageTeb
1d63d000 ( 481524) : 22.96% 31.08% : RegionUsageHeap
0 ( 0) : 00.00% 00.00% : RegionUsagePageHeap
1000 ( 4) : 00.00% 00.00% : RegionUsagePeb
0 ( 0) : 00.00% 00.00% : RegionUsageProcessParametrs
0 ( 0) : 00.00% 00.00% : RegionUsageEnvironmentBlock
Tot: 7ffe1000 (2097028 KB) Busy: 5e8d1000 (1549124 KB)
-------------------- Type SUMMARY --------------------------
TotSize ( KB) Pct(Tots) Usage
21710000 ( 547904) : 26.13% : <free>
0 ( 0) : 00.00% : MEM_IMAGE
0 ( 0) : 00.00% : MEM_MAPPED
5e8d1000 ( 1549124) : 73.87% : MEM_PRIVATE
-------------------- State SUMMARY --------------------------
TotSize ( KB) Pct(Tots) Usage
5e8d1000 ( 1549124) : 73.87% : MEM_COMMIT
21710000 ( 547904) : 26.13% : MEM_FREE
0 ( 0) : 00.00% : MEM_RESERVE
!heap -s (省略不必要的):
LFH Key : 0x77da322c
Termination on corruption : DISABLED
Heap Flags Reserv Commit Virt Free List UCR Virt Lock Fast
(k) (k) (k) (k) length blocks cont. heap
-----------------------------------------------------------------------------
017b0000 00001002 64000 50348 64000 3884 890 10 510 2b5 LFH
034a0000 00001002 1181248 1115336 1181248 30629 2336 1419 20 6c1 LFH
问题:
address 说
RegionUsageIsVAD 占用 1个G,
RegionUsageHeap 占用480M
heap 说
034a0000 堆占用1个G
简直不可思议啊,为什么会这样?
然后又用
!heap -stat -h
034a0000
heap @ 034a0000
group-by: TOTSIZE max-display: 20
size #blocks total ( %) (percent of total busy bytes)
3e800 1b8 - 6b6c000 (54.83)
4b4000 a - 2f08000 (24.00)
10000 150 - 1500000 (10.72)
200000 a - 1400000 (10.21)
上面统计出来的内存大小,又只有200M? 为什么三个数值都完全对不上呢?