虚拟和物理内存/ OutOfMemoryException异常 [英] Virtual and Physical Memory / OutOfMemoryException

查看:338
本文介绍了虚拟和物理内存/ OutOfMemoryException异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作,基本上加载了一堆数据进行处理64位的.Net Windows服务应用程序。在执行数据量的测试,我们能够压倒过程,它抛出一个OutOfMemoryException(我没有在过程中的任何性能统计信息时,它失败了。)我有一个很难相信,这个过程要求的内存块,它会自其在64位机器上运行已超过的过程中允许的地址空间。我知道这个过程是一台机器是在持续80%-90%的物理内存使用率附近运行。我的问题是:在CLR可以抛出一个OutOfMemoryException如果机器上的可用物理内存严重不足,即使这个过程不会超过它的虚拟内存允许量

I am working on a 64-bit .Net Windows Service application that essentially loads up a bunch of data for processing. While performing data volume testing, we were able to overwhelm the process and it threw an OutOfMemoryException (I do not have any performance statistics on the process when it failed.) I have a hard time believing that the process requested a chunk of memory that would have exceeded the allowable address space for the process since its running on a 64-bit machine. I do know that the process is running on a machine that is consistently in the neighborhood of 80%-90% physical memory usage. My question is: Can the CLR throw an OutOfMemoryException if the machine is critically low on available physical memory even though the process wouldn't exceed it's allowable amount of virtual memory?

感谢您的帮助!

推荐答案

有仍然存在一些限制到达在64位环境。检查此页面对于一些最常见的。简而言之,是的,你仍然可以运行内存不足,如果你的程序加载数据的128GB高达到虚拟内存。你也可以仍然由最大2GB每个进程限制的限制,如果你不具备IMAGE_FILE_LARGE_ADDRESS_AWARE环境变量设置。

There are still some reachable limits in place in a 64-bit environment. Check this page for some of the most common ones. In short, yes, you can still run out of memory, if your program loads a whopping 128GB of data into virtual memory. You could also still be limited by the 2GB max per-process limit if you do not have the IMAGE_FILE_LARGE_ADDRESS_AWARE environment variable set.

这篇关于虚拟和物理内存/ OutOfMemoryException异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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