本文介绍了高内存使用率--- RegionUsageIsVAD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的NT服务在运行一天后因内存不足异常"而崩溃了;当我分析转储文件时,我发现gcheap仅为160MB,而本机堆约为300MB,但是虚拟类型为"RegionUsageIsVAD"的存储器; 约为1.3GB.但是,我搜索了我的源代码,没有"virtualalloc" api调用,我不明白为什么虚拟内存使用率很高,但是gcheap和本机堆的使用率很低.谢谢!
转储报告如下:
0:067> !eeheap -gc GC堆数:1 第0代始于0x72dff784 第1代始于0x72d564f8 第2代始于0x01441000 临时段分配上下文:(0x732ff78c,0x732ff798) 段开始分配的大小 01440000 01441000 02419368 0xfd8368(16614248) 070a0000 070a1000 0808a904 0xfe9904(16685316) 090b0000 090b1000 0a09e4dc 0xfed4dc(16700636) 0a480000 0a481000 0b46bf18 0xfeaf18(16690968) 16f50000 16f51000 17f35e64 0xfe4e64(16666212) 186f0000 186f1000 196ec5e4 0xffb5e4(16758244) 196f0000 196f1000 1a6d5284 0xfe4284(16663172) 47240000 47241000 481b296c 0xf7196c(16193900) 72ac0000 72ac1000 732ff78c 0x83e78c(8644492) 大对象堆从0x02441000开始 段开始分配的大小 02440000 02441000 033d0fd8 0xf8ffd8(16318424) 2f450000 2f451000 2f791040 0x340040(3407936) 总大小:大小:0x99de83c(161343548)字节. ------------------------------ GC堆大小:大小:0x99de83c(161343548)字节. --------------------使用摘要-------------------------- TotSize(KB)Pct(点)Pct(忙)用法 4fe0c000(1308720):62.41%70.56%:RegionUsageIsVAD ec9d000(242292):11.55%00.00%:RegionUsageFree 9922000(156808):07.48%08.45%:RegionUsageImage 6dfe000(112632):05.37%06.07%:RegionUsageStack 0(0):00.00%00.00%:RegionUsageTeb 10e26000(276632):13.19%14.91%: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 收件人:7fff0000(2097088 KB)忙:71353000(1854796 KB) --------------------类型摘要-------------------------- TotSize(KB)百分数(Tots)用法 ec9d000(242292):11.55%:<免费> a440000(168192):08.02%:MEM_IMAGE ffd000(16372):00.78%:MEM_MAPPED 65f16000(1670232):79.65%:MEM_PRIVATE --------------------状态摘要-------------------------- TotSize(KB)百分数(Tots)用法 64112000(1639496):78.18%:MEM_COMMIT ec9d000(242292):11.55%:MEM_FREE d241000(215300):10.27%:MEM_RESERVE 最大的免费区域:基本61d20000-大小00d60000(13696 KB)
解决方案
I have a NT Service crashed after run for one day,it caused by "out of memory exception";When i analyzed the dump file, i found the gcheap was only about 160MB,and the native heap was about 300MB,but the virtual memory which type is "RegionUsageIsVAD" was about 1.3GB. however I searched my source code,there's no "virtualalloc" api call,I can't understand why the virtual memory usage was high,but the usage of gcheap and native heap was low. Thanks!
the dump report as below:
0:067> !eeheap -gc Number of GC Heaps: 1 generation 0 starts at 0x72dff784 generation 1 starts at 0x72d564f8 generation 2 starts at 0x01441000 ephemeral segment allocation context: (0x732ff78c, 0x732ff798) segment begin allocated size 01440000 01441000 02419368 0xfd8368(16614248) 070a0000 070a1000 0808a904 0xfe9904(16685316) 090b0000 090b1000 0a09e4dc 0xfed4dc(16700636) 0a480000 0a481000 0b46bf18 0xfeaf18(16690968) 16f50000 16f51000 17f35e64 0xfe4e64(16666212) 186f0000 186f1000 196ec5e4 0xffb5e4(16758244) 196f0000 196f1000 1a6d5284 0xfe4284(16663172) 47240000 47241000 481b296c 0xf7196c(16193900) 72ac0000 72ac1000 732ff78c 0x83e78c(8644492) Large object heap starts at 0x02441000 segment begin allocated size 02440000 02441000 033d0fd8 0xf8ffd8(16318424) 2f450000 2f451000 2f791040 0x340040(3407936) Total Size: Size: 0x99de83c (161343548) bytes. ------------------------------ GC Heap Size: Size: 0x99de83c (161343548) bytes. -------------------- Usage SUMMARY -------------------------- TotSize ( KB) Pct(Tots) Pct(Busy) Usage 4fe0c000 ( 1308720) : 62.41% 70.56% : RegionUsageIsVAD ec9d000 ( 242292) : 11.55% 00.00% : RegionUsageFree 9922000 ( 156808) : 07.48% 08.45% : RegionUsageImage 6dfe000 ( 112632) : 05.37% 06.07% : RegionUsageStack 0 ( 0) : 00.00% 00.00% : RegionUsageTeb 10e26000 ( 276632) : 13.19% 14.91% : 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: 7fff0000 (2097088 KB) Busy: 71353000 (1854796 KB) -------------------- Type SUMMARY -------------------------- TotSize ( KB) Pct(Tots) Usage ec9d000 ( 242292) : 11.55% : <free> a440000 ( 168192) : 08.02% : MEM_IMAGE ffd000 ( 16372) : 00.78% : MEM_MAPPED 65f16000 ( 1670232) : 79.65% : MEM_PRIVATE -------------------- State SUMMARY -------------------------- TotSize ( KB) Pct(Tots) Usage 64112000 ( 1639496) : 78.18% : MEM_COMMIT ec9d000 ( 242292) : 11.55% : MEM_FREE d241000 ( 215300) : 10.27% : MEM_RESERVE Largest free region: Base 61d20000 - Size 00d60000 (13696 KB)
解决方案
这篇关于高内存使用率--- RegionUsageIsVAD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!