久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <i id='lC2ae'><tr id='lC2ae'><dt id='lC2ae'><q id='lC2ae'><span id='lC2ae'><b id='lC2ae'><form id='lC2ae'><ins id='lC2ae'></ins><ul id='lC2ae'></ul><sub id='lC2ae'></sub></form><legend id='lC2ae'></legend><bdo id='lC2ae'><pre id='lC2ae'><center id='lC2ae'></center></pre></bdo></b><th id='lC2ae'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lC2ae'><tfoot id='lC2ae'></tfoot><dl id='lC2ae'><fieldset id='lC2ae'></fieldset></dl></div>
    1. <legend id='lC2ae'><style id='lC2ae'><dir id='lC2ae'><q id='lC2ae'></q></dir></style></legend>

        <tfoot id='lC2ae'></tfoot>

      1. <small id='lC2ae'></small><noframes id='lC2ae'>

          <bdo id='lC2ae'></bdo><ul id='lC2ae'></ul>
      2. 如何請求 node.js 中的垃圾收集器運行?

        How to request the Garbage Collector in node.js to run?(如何請求 node.js 中的垃圾收集器運行?)

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

        1. <tfoot id='ufyPW'></tfoot>

              • <i id='ufyPW'><tr id='ufyPW'><dt id='ufyPW'><q id='ufyPW'><span id='ufyPW'><b id='ufyPW'><form id='ufyPW'><ins id='ufyPW'></ins><ul id='ufyPW'></ul><sub id='ufyPW'></sub></form><legend id='ufyPW'></legend><bdo id='ufyPW'><pre id='ufyPW'><center id='ufyPW'></center></pre></bdo></b><th id='ufyPW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ufyPW'><tfoot id='ufyPW'></tfoot><dl id='ufyPW'><fieldset id='ufyPW'></fieldset></dl></div>
                  <tbody id='ufyPW'></tbody>
                  <bdo id='ufyPW'></bdo><ul id='ufyPW'></ul>
                  <legend id='ufyPW'><style id='ufyPW'><dir id='ufyPW'><q id='ufyPW'></q></dir></style></legend>

                  本文介紹了如何請求 node.js 中的垃圾收集器運行?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  在啟動時,我的 node.js 應用似乎使用了大約 200MB 的內存.如果我不理會它一段時間,它會縮小到 9MB 左右.

                  At startup, it seems my node.js app uses around 200MB of memory. If I leave it alone for a while, it shrinks to around 9MB.

                  是否可以在應用內:

                  1. 檢查應用使用了多少內存?
                  2. 請求垃圾收集器運行?

                  我問的原因是,我從磁盤加載了一些文件,這些文件是臨時處理的.這可能會導致內存使用量激增.但是我不想在 GC 運行之前加載更多文件,否則會有內存不足的風險.

                  The reason I ask is, I load a number of files from disk, which are processed temporarily. This probably causes the memory usage to spike. But I don't want to load more files until the GC runs, otherwise there is the risk that I will run out of memory.

                  有什么建議嗎?

                  推薦答案

                  如果使用 --expose-gc 標志啟動節點進程,則可以調用 global.gc() 強制節點運行垃圾回收.請記住,節點應用程序中的所有其他執行都會暫停,直到 GC 完成,所以不要太頻繁地使用它,否則會影響性能.

                  If you launch the node process with the --expose-gc flag, you can then call global.gc() to force node to run garbage collection. Keep in mind that all other execution within your node app is paused until GC completes, so don't use it too often or it will affect performance.

                  您可能希望在從代碼中進行 GC 調用時包含一個檢查,這樣如果節點在沒有標志的情況下運行,事情就不會變壞:

                  You might want to include a check when making GC calls from within your code so things don't go bad if node was run without the flag:

                  try {
                    if (global.gc) {global.gc();}
                  } catch (e) {
                    console.log("`node --expose-gc index.js`");
                    process.exit();
                  }
                  

                  這篇關于如何請求 node.js 中的垃圾收集器運行?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)

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

                        <i id='Ky4Ss'><tr id='Ky4Ss'><dt id='Ky4Ss'><q id='Ky4Ss'><span id='Ky4Ss'><b id='Ky4Ss'><form id='Ky4Ss'><ins id='Ky4Ss'></ins><ul id='Ky4Ss'></ul><sub id='Ky4Ss'></sub></form><legend id='Ky4Ss'></legend><bdo id='Ky4Ss'><pre id='Ky4Ss'><center id='Ky4Ss'></center></pre></bdo></b><th id='Ky4Ss'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Ky4Ss'><tfoot id='Ky4Ss'></tfoot><dl id='Ky4Ss'><fieldset id='Ky4Ss'></fieldset></dl></div>
                      • <legend id='Ky4Ss'><style id='Ky4Ss'><dir id='Ky4Ss'><q id='Ky4Ss'></q></dir></style></legend>
                      • <tfoot id='Ky4Ss'></tfoot>
                        • <bdo id='Ky4Ss'></bdo><ul id='Ky4Ss'></ul>

                            <tbody id='Ky4Ss'></tbody>

                          1. 主站蜘蛛池模板: 国产综合视频 | 亚洲一区二区三区久久久 | 在线亚洲欧美 | 免费在线看黄视频 | 色www精品视频在线观看 | 国产小视频在线观看 | 成人精品国产免费网站 | 亚洲欧美在线观看视频 | a在线视频 | 在线观看国产视频 | 99精品免费久久久久久久久日本 | 久久九九99 | 婷婷色国产偷v国产偷v小说 | 国产亚洲精品精品国产亚洲综合 | 国产精品免费一区二区 | 欧洲在线视频 | 三级免费 | 久久午夜电影 | 又黄又爽的网站 | 精品欧美一区二区三区精品久久 | 中文字幕综合 | 国产精品国产亚洲精品看不卡15 | 国产精品美女久久久久久不卡 | 亚洲欧美国产一区二区三区 | 国产精品久久av | 日韩一级免费观看 | 午夜日韩视频 | 国产精品久久国产精品 | 国产在线精品一区二区三区 | 欧美激情视频网站 | 天天天久久久 | 亚洲一区二区三区四区五区午夜 | 91视频在线| 在线观看成人免费视频 | 亚洲欧洲中文 | 欧美日韩中文在线观看 | 成人毛片在线观看 | 日韩1区| 欧美成ee人免费视频 | 日韩国产欧美一区 | 国产亚洲精品久久久久动 |