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

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

      • <bdo id='BZqZ8'></bdo><ul id='BZqZ8'></ul>

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

        <tfoot id='BZqZ8'></tfoot>
      2. C++ 是否限制遞歸深度?

        Does C++ limit recursion depth?(C++ 是否限制遞歸深度?)
      3. <legend id='AZ36B'><style id='AZ36B'><dir id='AZ36B'><q id='AZ36B'></q></dir></style></legend>

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

                <tbody id='AZ36B'></tbody>
                • <bdo id='AZ36B'></bdo><ul id='AZ36B'></ul>

                  <tfoot id='AZ36B'></tfoot>

                  <i id='AZ36B'><tr id='AZ36B'><dt id='AZ36B'><q id='AZ36B'><span id='AZ36B'><b id='AZ36B'><form id='AZ36B'><ins id='AZ36B'></ins><ul id='AZ36B'></ul><sub id='AZ36B'></sub></form><legend id='AZ36B'></legend><bdo id='AZ36B'><pre id='AZ36B'><center id='AZ36B'></center></pre></bdo></b><th id='AZ36B'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='AZ36B'><tfoot id='AZ36B'></tfoot><dl id='AZ36B'><fieldset id='AZ36B'></fieldset></dl></div>
                  本文介紹了C++ 是否限制遞歸深度?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  在 Python 中存在最大遞歸深度.似乎是因為 Python 被解釋而不是編譯.C++ 有相同的概念嗎?還是只連接內存限制?

                  In Python there is a maximum recursion depth. Seems it is because Python is interpreted rather than compiled. Does C++ have the same concept? Or it is connected only with RAM limit?

                  推薦答案

                  C++ 中的限制是由于堆棧的最大大小.這通常比 RAM 的大小小幾個數量級,但仍然相當大.(幸運的是,像字符串內容這樣的大東西通常不會保存在堆棧本身中.)

                  The limit in C++ is due to the maximum size of the stack. That's typically less than the size of RAM by quite a few orders of magnitude, but is still pretty large. (Luckily, large things like string contents are typically held not on the stack itself.)

                  堆棧限制通常可在操作系統級別進行調整.(如果您使用的是 Unix,請參閱內置 ulimit shell 的文檔.)這臺機器 (OSX) 上的默認值為 8 MB.

                  The stack limit is typically tunable at the OS level. (See the docs for the ulimit shell built-in if you're on Unix.) The default on this machine (OSX) is 8 MB.

                  當然,在計算遞歸深度時,堆棧的大小本身并不完全有幫助.要知道這一點,您必須計算遞歸函數(也稱為堆棧幀)的激活記錄(或多個記錄)的大小.最簡單的方法(我知道)是使用反匯編器(大多數調試器的功能)并在每個函數的開始和結束時讀出堆棧指針調整的大小.這是亂七八糟的.(您可以通過其他方式解決這個問題——例如,計算兩次調用中指向變量的指針之間的差異——但它們甚至更令人討厭,尤其是對于可移植代碼.從反匯編中讀取值更容易 IMO.)

                  Of course, the size of the stack doesn't entirely help by itself when it comes to working out how deep you can recurse. To know that, you have to compute the size of the activation record (or records) of the recursive function (also called a stack frame). The easiest way to do that (that I know of) is to use a disassembler (a feature of most debuggers) and to read out the size of the stack pointer adjustments at the start and end of every function. Which is messy. (You can work it out other ways –?for example, computing the difference between pointers to variables in two calls – but they're even nastier, especially for portable code. Reading the values out of the disassembly is easier IMO.)

                  這篇關于C++ 是否限制遞歸深度?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  In what ways do C++ exceptions slow down code when there are no exceptions thown?(當沒有異常時,C++ 異常會以何種方式減慢代碼速度?)
                  Why catch an exception as reference-to-const?(為什么要捕獲異常作為對 const 的引用?)
                  When and how should I use exception handling?(我應該何時以及如何使用異常處理?)
                  Scope of exception object in C++(C++中異常對象的范圍)
                  Catching exceptions from a constructor#39;s initializer list(從構造函數的初始化列表中捕獲異常)
                  Difference between C++03 throw() specifier C++11 noexcept(C++03 throw() 說明符 C++11 noexcept 之間的區別)
                  <legend id='3nHir'><style id='3nHir'><dir id='3nHir'><q id='3nHir'></q></dir></style></legend>
                  <i id='3nHir'><tr id='3nHir'><dt id='3nHir'><q id='3nHir'><span id='3nHir'><b id='3nHir'><form id='3nHir'><ins id='3nHir'></ins><ul id='3nHir'></ul><sub id='3nHir'></sub></form><legend id='3nHir'></legend><bdo id='3nHir'><pre id='3nHir'><center id='3nHir'></center></pre></bdo></b><th id='3nHir'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3nHir'><tfoot id='3nHir'></tfoot><dl id='3nHir'><fieldset id='3nHir'></fieldset></dl></div>

                      • <bdo id='3nHir'></bdo><ul id='3nHir'></ul>

                        <small id='3nHir'></small><noframes id='3nHir'>

                          <tfoot id='3nHir'></tfoot>

                            <tbody id='3nHir'></tbody>
                          • 主站蜘蛛池模板: 欧美精品一区在线发布 | 97日日碰人人模人人澡分享吧 | 日韩精品一二三区 | 亚洲精品一区二区三区四区高清 | 伊人免费视频二 | 久久久久久电影 | 免费在线看a | 在线看中文字幕 | 97精品国产97久久久久久免费 | 国产精品国产自产拍高清 | 在线免费观看一区二区 | 国产色99精品9i | 久久伊人青青草 | 久久一二| com.色.www在线观看 | 欧美精品啪啪 | 国产黄色免费网站 | www.99热.com | 日韩一区二区在线观看 | 亚洲视频一区二区三区 | 三级av在线| 91玖玖| 五月婷婷色 | 久久久久久久久淑女av国产精品 | 免费国产一区 | 久久aⅴ乱码一区二区三区 亚洲国产成人精品久久久国产成人一区 | 久久在线免费 | 农村真人裸体丰满少妇毛片 | 国产999精品久久久影片官网 | 亚洲国产精品日韩av不卡在线 | 国产成人免费视频网站视频社区 | 久久精品国产99国产精品 | 亚洲高清在线观看 | 亚洲第一网站 | 国产97在线 | 日韩 | 精品亚洲第一 | 青草福利 | 亚洲黄色高清视频 | 91视频久久久久 | 日韩美女在线看免费观看 | 淫片专区|