Debugging Tools for Windows |
!frag扩展显示目标系统的内存池的碎片信息。
Windows 2000 | Kdextx86.dll |
Windows XP和之后 | Kdexts.dll |
如果内存池碎片非常多的话,会降低性能。
下面是该命令的输出示例:
NonPaged Pool Fragmentation
index: 0 number of fragments: 4 bytes: 128
index: 1 number of fragments: 0 bytes: 0
index: 2 number of fragments: 2 bytes: 192
index: 3 number of fragments: 0 bytes: 0
...
index: 20 number of fragments: 0 bytes: 0
index: 21 number of fragments: 0 bytes: 0
index: 22 number of fragments: 1 bytes: 7232
index: 23 number of fragments: 0 bytes: 0
index: 24 number of fragments: 0 bytes: 0
Number of fragments: 11 consuming 9344 bytes
NonPagedPool Usage: 1105920 bytes
kd> !frag 2
NonPaged Pool Fragmentation
818718a0 size: 20 previous size: a0 Cc
81870720 size: 20 previous size: 60 Cc
80d1ae80 size: 20 previous size: a0 Cc
818703c0 size: 20 previous size: 60 Cc
80962600 size: 60 previous size: a0 ScsD
8098c180 size: 60 previous size: 100 ScsD
81937680 size: 160 previous size: 40 Lric
81870e00 size: 120 previous size: 20 None
81937d80 size: 260 previous size: 20 Thre
81936000 size: 220 previous size: 0 Proc
81610260 size: 1c40 previous size: 260 à
Number of fragments: 11 consuming 9344 bytes
NonPagedPool Usage: 1105920 bytes
关于内存管理的更多信息,查看Mark Russinovich 和David Solomon 编写的Microsoft Windows Internals。