开发者

Is there any way to pre-allocate the heap in the .NET runtime, like -Xmx/-Xms in Java?

On开发者_运维知识库 most platforms and with most JVMs you can pre-allocate the heap on start-up by setting the -Xmx and -Xms options (or a variant thereof) to the same size.

Is it possible to do the same with .NET, and if so, how?


Sadly no it's not, .the NET runtime makes all the decisions about heap size and relative generational sizing for you.

The only thing you can do is switch between the server version of the garbage collector and the workstation one. This gives more aggressive, one GC per core collecting in the server version and a preference for keeping the app responsive in the workstation one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜