久久久久久久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>
                          • 主站蜘蛛池模板: 久久精品一区 | 国产成人99久久亚洲综合精品 | 免费a视频 | 久久久久久久国产精品 | 亚洲视频在线看 | 精品1区2区 | 在线观看中文字幕 | 成年在线观看 | 日日操天天操 | 欧美毛片基地 | 亚洲亚洲人成综合网络 | 国产成人av在线播放 | 四虎影院www | 欧美999 | 成人性色生活片 | 午夜视频在线 | 国产九九 | 日韩中文一区 | 国产欧美激情 | 天天插天天爽 | 国产午夜精品一区二区三区视频 | 日韩视频免费大全中文字幕 | 色婷婷免费视频 | 中文有码在线观看 | www.黄色在线 | 亚洲国产成人精品女人久久久 | 亚洲精品一区二区三区蜜桃久 | 欧美日韩一区二区三区四区 | 九九国产视频 | 天堂99| 欧美国产日韩在线 | 欧美色影院| 久久精品在线 | 日本少妇中文字幕 | 亚洲特级片| 国产又粗又猛视频免费 | 午夜在线视频观看 | 国产精品美女在线 | 亚洲色网址 | 亚洲 欧美 激情 另类 校园 | 狠狠做深爱婷婷综合一区 |