为什么堆入口越来越大 [英] Why does heap entry become bigger and bigger

查看:59
本文介绍了为什么堆入口越来越大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi

while(TRUE)
{
//泄漏内存
void * p = HeapAlloc(GetProcessHeap(),0,500);
}

在windbg中,我注意到以该模式显示的堆条目(无论是在
调试模式下还是在释放模式下)

0037aa70:00210 . 00210 [101]-忙(1f4)
0037ac80:00210. 00210 [101]-忙(1f4)
0037ae90:00210. 00210 [101]-忙(1f4)
0037b0a0:00210. 00210 [101]-忙(1f4)
0037b2b0:00210. 00210 [101]-忙(1f4)
0037b4c0:00210. 00210 [101]-忙碌(1f4)
0037b6d0:00210. 00210 [101]-忙(1f4)
0037b8e0:00210. 00210 [101]-忙(1f4)
0037baf0:00210. 00210 [101]-忙(1f4)
0037bd00:00210. 00210 [101]-忙(1f4)
0037bf10:00210. 00210 [101]-忙(1f4)
0037c120:00210. 00210 [101]-忙(1f4)
0037c330:00210. 04010 [101]-忙(3ff8)内部
00380340:04010. 04010 [101]-忙(3ff8)内部
00384350:04010. 04010 [101]-忙(3ff8)内部
00388360:04010. 04010 [101]-忙(3ff8)内部
0038c370:04010. 04010 [101]-忙(3ff8)内部
00390380:04010. 04010 [101]-忙(3ff8)内部
00394390:04010. 04010 [101]-忙(3ff8)内部
003983a0:04010. 04010 [101]-忙(3ff8)内部
0039c3b0:04010. 04010 [101]-忙(3ff8)内部
003a03c0:04010. 04010 [101]-忙(3ff8)内部
003a43d0:04010. 04010 [101]-忙(3ff8)内部
003a83e0:04010. 04010 [101]-忙(3ff8)内部
003ac3f0:04010. 04010 [101]-忙(3ff8)内部
003b0400:04010. 04010 [101]-忙(3ff8)内部
003b4410:04010. 04010 [101]-忙(3ff8)内部
003b8420:04010. 04010 [101]-忙(3ff8)内部
003bc430:04010. 04010 [101]-繁忙(3ff8)内部

...

01a50090:40010. 40010 [101]-忙(3fff8)内部
01a900a0:40010. 40010 [101]-繁忙(3fff8)内部
01ad00b0:40010. 40010 [101]-忙(3fff8)内部
01b100c0:40010. 40010 [101]-繁忙(3fff8)内部
01b500d0:40010. 40010 [101]-繁忙(3fff8)内部
01b900e0:40010. 40010 [101]-繁忙(3fff8)内部
01bd00f0:40010. 40010 [101]-繁忙(3fff8)内部
01c10100:40010. 40010 [101]-繁忙(3fff8)内部
01c50110:40010. 40010 [101]-忙(3fff8)内部

前几个条目
0037baf0:00210. 00210 [101]-忙(1f4)
是可以接受的.

为什么分配越来越大?

00394390:04010. 04010 [101]-忙(3ff8)内部
...
01c10100:40010. 40010 [101]-忙(3fff8)内部

谢谢

Hi

while (TRUE)
{
   // Leak the memory
   void* p = HeapAlloc(GetProcessHeap(), 0, 500);
}

In windbg, I notice that the heap entries shown in this pattern (whether in
debug mode or in release mode)

        0037aa70: 00210 . 00210 [101] - busy (1f4)
        0037ac80: 00210 . 00210 [101] - busy (1f4)
        0037ae90: 00210 . 00210 [101] - busy (1f4)
        0037b0a0: 00210 . 00210 [101] - busy (1f4)
        0037b2b0: 00210 . 00210 [101] - busy (1f4)
        0037b4c0: 00210 . 00210 [101] - busy (1f4)
        0037b6d0: 00210 . 00210 [101] - busy (1f4)
        0037b8e0: 00210 . 00210 [101] - busy (1f4)
        0037baf0: 00210 . 00210 [101] - busy (1f4)
        0037bd00: 00210 . 00210 [101] - busy (1f4)
        0037bf10: 00210 . 00210 [101] - busy (1f4)
        0037c120: 00210 . 00210 [101] - busy (1f4)
        0037c330: 00210 . 04010 [101] - busy (3ff8) Internal
        00380340: 04010 . 04010 [101] - busy (3ff8) Internal
        00384350: 04010 . 04010 [101] - busy (3ff8) Internal
        00388360: 04010 . 04010 [101] - busy (3ff8) Internal
        0038c370: 04010 . 04010 [101] - busy (3ff8) Internal
        00390380: 04010 . 04010 [101] - busy (3ff8) Internal
        00394390: 04010 . 04010 [101] - busy (3ff8) Internal
        003983a0: 04010 . 04010 [101] - busy (3ff8) Internal
        0039c3b0: 04010 . 04010 [101] - busy (3ff8) Internal
        003a03c0: 04010 . 04010 [101] - busy (3ff8) Internal
        003a43d0: 04010 . 04010 [101] - busy (3ff8) Internal
        003a83e0: 04010 . 04010 [101] - busy (3ff8) Internal
        003ac3f0: 04010 . 04010 [101] - busy (3ff8) Internal
        003b0400: 04010 . 04010 [101] - busy (3ff8) Internal
        003b4410: 04010 . 04010 [101] - busy (3ff8) Internal
        003b8420: 04010 . 04010 [101] - busy (3ff8) Internal
        003bc430: 04010 . 04010 [101] - busy (3ff8) Internal

...

        01a50090: 40010 . 40010 [101] - busy (3fff8) Internal
        01a900a0: 40010 . 40010 [101] - busy (3fff8) Internal
        01ad00b0: 40010 . 40010 [101] - busy (3fff8) Internal
        01b100c0: 40010 . 40010 [101] - busy (3fff8) Internal
        01b500d0: 40010 . 40010 [101] - busy (3fff8) Internal
        01b900e0: 40010 . 40010 [101] - busy (3fff8) Internal
        01bd00f0: 40010 . 40010 [101] - busy (3fff8) Internal
        01c10100: 40010 . 40010 [101] - busy (3fff8) Internal
        01c50110: 40010 . 40010 [101] - busy (3fff8) Internal

The first few entries
        0037baf0: 00210 . 00210 [101] - busy (1f4)
are acceptable.

But why does the allocation become bigger and bigger?

        00394390: 04010 . 04010 [101] - busy (3ff8) Internal
        ...
        01c10100: 40010 . 40010 [101] - busy (3fff8) Internal

Thanks

推荐答案

请帮助...

Help, please...


这篇关于为什么堆入口越来越大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆