如何理解 WinDBG SOS 中 !dumpheap 的 -min/-max 选项 [英] How to understand the -min/-max options of !dumpheap in WinDBG SOS

查看:41
本文介绍了如何理解 WinDBG SOS 中 !dumpheap 的 -min/-max 选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文档说它用于限制输出对象的大小,但根据我的测试,这不是我所期望的:

The documentation said it's used for limit the size of the output object, but based on my test, it's not what I expected:

0:000> !dumpheap -mt 000007fee12406a8 -max 400 -min 399
Address               MT     Size
000000000d1dc1f8 000007fee12406a8      936     
000000000d62bed8 000007fee12406a8     1016     
000000000d630d00 000007fee12406a8      984     
000000000d633aa8 000007fee12406a8      984     
000000000d65f368 000007fee12406a8      952     
000000000d685ff0 000007fee12406a8      952     
000000000d6b2150 000007fee12406a8      952    

那么如何理解-min-max 选项呢?

So how to understand the -min and -max options?

推荐答案

WinDbg 的默认数字格式为十六进制.0x400 是 1024 而 0x399 是 921,这解释了输出.如果您想要十进制数字,请使用 0n 前缀,例如0n4000n399.

WinDbg's default number format is hexadecimal. 0x400 is 1024 and 0x399 is 921, that explains the output. If you want decimal numbers, use the 0n prefix, e.g. 0n400 and 0n399.

这篇关于如何理解 WinDBG SOS 中 !dumpheap 的 -min/-max 选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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