什麼是堆棧和堆? - What and where are the stack and heap?

問題:

Programming language books explain that value types are created on the stack , and reference types are created on the heap , without explaining what these two things are. 編程語言書籍解釋了值類型是在堆棧上建立的,而引用類型是在堆上建立的,而沒有說明這兩個是什麼。 I haven't read a clear explanation of this. 我尚未閱讀清楚的解釋。 I understand what a stack is. 我瞭解堆棧是什麼。 But, 但, 編程

  • Where and what are they (physically in a real computer's memory)? 它們在哪裏和在哪裏(物理上在真實計算機的內存中)?
  • To what extent are they controlled by the OS or language run-time? 它們在多大程度上受操做系統或語言運行時的控制?
  • What is their scope? 他們的範圍是什麼?
  • What determines the size of each of them? 什麼決定了它們的大小?
  • What makes one faster? 是什麼使速度更快?

解決方案:

參考一: https://stackoom.com/question/Kn5/什麼是堆棧和堆
參考二: https://oldbug.net/q/Kn5/What-and-where-are-the-stack-and-heap
相關文章
相關標籤/搜索