配置.NET CLR内存使用情况 [英] Configure .NET CLR RAM usage

查看:160
本文介绍了配置.NET CLR内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有配置我的机器上的.NET CLR内存使用的方法?

Is there a method of configuring the .NET CLR RAM usage on my machine?

假设我有64GB的RAM,我想它限制在4GB的?这可能吗?

Suppose I have 64GB of RAM and I want to limit it to 4GB? It this possible?

修改 - 问题的根源是,我有一个正常运行在64位的64位应用程序 - 4GB的机器,但在64位上运行时 - 在64GB机失败(停了下来在分配内存时),它的轨道。我想内存碎片的原因是应用程序尝试分配高达8GB的块,如果有足够的RAM可用,否则它打破了分配到更小的块。所以,我必须配置应用程序始终使用一小块一小块?

Edit - The root of the problem is that I have a 64-bit application that runs fine on a 64bit - 4GB machine but when run on a 64bit - 64GB machine it fails (stops dead in it's tracks when allocating memory). I'm thinking memory fragmentation is the cause as the application attempts to allocate up to 8GB chunks if there is enough RAM available otherwise it breaks the allocations down to much smaller chunks. So I would have to configure the application to always use small chunks?

推荐答案

的%SystemRoot%\ Microsoft.NET \框架[版本] \ CONFIG

%SystemRoot%\Microsoft.NET\Framework[version]\CONFIG

在memoryLimit属性控制的一个进程被允许占用的物理内存的百分比。我知道这是不是你正在寻找什么,但最接近我能找到。

The memoryLimit attribute controls the percentage of physical memory that a process is allowed to consume. I know this is not exactly what you are looking for but the closest I could find.

这篇关于配置.NET CLR内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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