<i id='7RhKS'><tr id='7RhKS'><dt id='7RhKS'><q id='7RhKS'><span id='7RhKS'><b id='7RhKS'><form id='7RhKS'><ins id='7RhKS'></ins><ul id='7RhKS'></ul><sub id='7RhKS'></sub></form><legend id='7RhKS'></legend><bdo id='7RhKS'><pre id='7RhKS'><center id='7RhKS'></center></pre></bdo></b><th id='7RhKS'></th></span></q></dt></tr></i><div id='7RhKS'><tfoot id='7RhKS'></tfoot><dl id='7RhKS'><fieldset id='7RhKS'></fieldset></dl></div>
      <tfoot id='7RhKS'></tfoot><legend id='7RhKS'><style id='7RhKS'><dir id='7RhKS'><q id='7RhKS'></q></dir></style></legend>

          <bdo id='7RhKS'></bdo><ul id='7RhKS'></ul>

      1. <small id='7RhKS'></small><noframes id='7RhKS'>

      2. 我可以(并且我曾经想要)在.net 中设置最大堆大小吗?

        Can I (and do I ever want to) set the maximum heap size in .net?(我可以(并且我曾经想要)在.net 中设置最大堆大小吗?)

      3. <legend id='FWu2w'><style id='FWu2w'><dir id='FWu2w'><q id='FWu2w'></q></dir></style></legend>
          • <tfoot id='FWu2w'></tfoot>

            <small id='FWu2w'></small><noframes id='FWu2w'>

                <tbody id='FWu2w'></tbody>
              <i id='FWu2w'><tr id='FWu2w'><dt id='FWu2w'><q id='FWu2w'><span id='FWu2w'><b id='FWu2w'><form id='FWu2w'><ins id='FWu2w'></ins><ul id='FWu2w'></ul><sub id='FWu2w'></sub></form><legend id='FWu2w'></legend><bdo id='FWu2w'><pre id='FWu2w'><center id='FWu2w'></center></pre></bdo></b><th id='FWu2w'></th></span></q></dt></tr></i><div id='FWu2w'><tfoot id='FWu2w'></tfoot><dl id='FWu2w'><fieldset id='FWu2w'></fieldset></dl></div>
                  <bdo id='FWu2w'></bdo><ul id='FWu2w'></ul>

                  本文介绍了我可以(并且我曾经想要)在.net 中设置最大堆大小吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  来自 java 背景,我习惯的一件事是告诉 JVM 最大堆大小应该是多少.如果正在运行的程序尝试吞下的资源超出了允许范围,而垃圾收集器无法释放更多资源,则会抛出 OutOfMemoryError 并且一切都会发生.所以设置最大堆大小在 Java 中很重要.

                  Coming from a java background, one of the things I am used to is telling the JVM what the maximum heap size should be. If the running program tries to swallow more than is allowed, and the garbage collector cannot free any more resources, then OutOfMemoryError is thrown and it all goes bang. So setting the maximum heap size is important in Java.

                  这适用于 .net 吗?你能设置堆大小限制吗?CLR 是否会不断增长其堆,直到达到机器的物理极限?或者,由于某种微妙的原因,我的 Java 闪烁器让我看不到,这不是 .net 中的问题吗?

                  Does this apply in .net? Can you set the heap size limits? Does the CLR just keep growing its heap until it reaches the machine's physical limits? Or is it not an issue in .net for some subtle reason that my Java blinkers stop me from seeing?

                  推荐答案

                  您无法在 .Net 中设置最大堆大小,除非您自己在进程中托管 CLR.

                  You can't set max heap size in .Net unless you host the CLR yourself in a process.

                  要控制 CLR 的内存分配,包括最大堆大小,您需要使用托管 api 来托管 clr 并专门使用内存管理器接口",可以在此处找到一些入门信息 MSDN 杂志,CLR 由内而外的专栏:CLR 托管 API

                  To control the memory allocations of CLR including the max heap size, you need to use the hosting api to host the clr and specifically use the "Memory manager interfaces", some starter info can be found here MSDN Magazine, column CLR Inside Out : CLR Hosting APIs

                  回答你的问题,你为什么要控制内存分配或特别是最大堆大小,你通常不想,但是 如果 你正在编写一个应用程序像 SQL Server 或 IIS 或一些实时应用程序,那么你有一个很好的理由来控制内存,特别是避免分页,否则 CLR 本身和操作系统已经为你做了很好的工作,剩下的是为了确保您的应用程序使用最少的资源来正常工作.

                  to answer you question, why would you want to control the memory allocation or specifically max heap size, you usually don't want to, but if you're writing an application that is like SQL Server or IIS or some real time application then you'd have a pretty good reason to have control over memory and specifically, avoid paging, otherwise the CLR itself and the OS already do a pretty good job for you, and what is left is to ensure your that application uses minimum resources for things to work well.

                  这篇关于我可以(并且我曾经想要)在.net 中设置最大堆大小吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  IBM.Data.DB2.Core connection problems(IBM.Data.DB2.Core 连接问题)
                  Datetime field overflow with IBM Data Server Client v9.7fp5(IBM Data Server Client v9.7fp5 的日期时间字段溢出)
                  Using entity Framework with .NET Core and DB2(将实体框架与 .NET Core 和 DB2 结合使用)
                  IBM .NET Data Provider Connection String issue with Library List(库列表的 IBM .NET 数据提供程序连接字符串问题)
                  .NET DB2 OLEDB pre-requisites(.NET DB2 OLEDB 先决条件)
                  Cannot connect to DB2: IBM.Data.DB2.Core version 3.1.0.400 on Azure Function(无法连接到 DB2:Azure 函数上的 IBM.Data.DB2.Core 版本 3.1.0.400)

                  1. <legend id='BkxQJ'><style id='BkxQJ'><dir id='BkxQJ'><q id='BkxQJ'></q></dir></style></legend>

                        <bdo id='BkxQJ'></bdo><ul id='BkxQJ'></ul>

                        <small id='BkxQJ'></small><noframes id='BkxQJ'>

                        <tfoot id='BkxQJ'></tfoot>
                          <tbody id='BkxQJ'></tbody>
                        <i id='BkxQJ'><tr id='BkxQJ'><dt id='BkxQJ'><q id='BkxQJ'><span id='BkxQJ'><b id='BkxQJ'><form id='BkxQJ'><ins id='BkxQJ'></ins><ul id='BkxQJ'></ul><sub id='BkxQJ'></sub></form><legend id='BkxQJ'></legend><bdo id='BkxQJ'><pre id='BkxQJ'><center id='BkxQJ'></center></pre></bdo></b><th id='BkxQJ'></th></span></q></dt></tr></i><div id='BkxQJ'><tfoot id='BkxQJ'></tfoot><dl id='BkxQJ'><fieldset id='BkxQJ'></fieldset></dl></div>