Configure .NET CLR RAM usage

后端 未结 2 1498
孤街浪徒
孤街浪徒 2021-01-15 10:44

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

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

E

2条回答
  •  时光取名叫无心
    2021-01-15 10:59

    You might want to look into using PublicDomain. It is a library that exposes a lot of lower level capabilities, such as spawning processes with memory limits. There is actually a CodeProject article that describes how to do exactly that with PublicDomain:

    http://www.codeproject.com/KB/threads/Setting_Max_Memory_Limit.aspx

提交回复
热议问题