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

    <tfoot id='EFA6f'></tfoot>
      <bdo id='EFA6f'></bdo><ul id='EFA6f'></ul>
    1. <legend id='EFA6f'><style id='EFA6f'><dir id='EFA6f'><q id='EFA6f'></q></dir></style></legend>

        大对象堆碎片:CLR有什么解决办法吗?

        Large Object Heap fragmentation: CLR has any solution to it?(大对象堆碎片:CLR有什么解决办法吗?)

          <legend id='6dxmO'><style id='6dxmO'><dir id='6dxmO'><q id='6dxmO'></q></dir></style></legend>

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

          <small id='6dxmO'></small><noframes id='6dxmO'>

                  <bdo id='6dxmO'></bdo><ul id='6dxmO'></ul>
                  本文介绍了大对象堆碎片:CLR有什么解决办法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如果您的应用程序必须对大尺寸对象(>85000 字节)进行大量分配/取消分配,最终会导致内存碎片,您的应用程序将抛出内存不足异常.

                  If you application is such that it has to do lot of allocation/de-allocation of large size objects (>85000 Bytes), its eventually will cause memory fragmentation and you application will throw an Out of memory exception.

                  这个问题有什么解决办法还是CLR内存管理的限制?

                  Is there any solution to this problem or is it a limitation of CLR memory management?

                  推荐答案

                  不幸的是,我所看到的所有信息都只建议自己管理风险因素:重用大对象,在开始时分配它们,确保它们是如果大小是彼此的倍数,则使用替代数据结构(列表、树)而不是数组.这只是给了我另一个想法,即创建一个非分段列表,而不是一个大数组,而是拆分成更小的数组.数组/列表似乎是 IME 最常见的罪魁祸首.

                  Unfortunately, all the info I've ever seen only suggests managing risk factors yourself: reuse large objects, allocate them at the beginning, make sure they're of sizes that are multiples of each other, use alternative data structures (lists, trees) instead of arrays. That just gave me an another idea of creating a non-fragmenting List that instead of one large array, splits into smaller ones. Arrays / Lists seem to be the most frequent culprits IME.

                  这是一篇关于它的 MSDN 杂志文章:http://msdn.microsoft.com/en-us/magazine/cc534993.aspx,但它并没有那么多用处.

                  Here's an MSDN magazine article about it: http://msdn.microsoft.com/en-us/magazine/cc534993.aspx, but there isn't that much useful in it.

                  这篇关于大对象堆碎片:CLR有什么解决办法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)
                  How to store delegates in a List(如何将代表存储在列表中)
                  Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)
                  CreateDelegate with unknown types(具有未知类型的 CreateDelegate)
                  Does Funclt;Tgt;.BeginInvoke use the ThreadPool?(Funclt;Tgt;.BeginInvoke 使用线程池吗?)
                  How to create a delegate to an instance method with a null target?(如何为具有空目标的实例方法创建委托?)
                    <tbody id='jrlxx'></tbody>

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

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

                    <tfoot id='jrlxx'></tfoot>

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

                      • <legend id='jrlxx'><style id='jrlxx'><dir id='jrlxx'><q id='jrlxx'></q></dir></style></legend>