当前位置:网站首页>The difference between heap and stack
The difference between heap and stack
2022-07-05 04:55:00 【yaohuiyaoo】
1. What is stack?
Stack is an ordered memory array .
2. The stack can store the value of variables , The execution environment of the program , Parameters passed to method
3. Data can only be inserted and deleted from the top of the stack , Put the data on the top of the stack for stacking , Delete the data as out of stack
4. What is a heap
Disordered memory area of heap , It can be deposited and removed in any order , although Can save data , But it cannot be explicitly deleted .
Heap is different from stack
1. Stack can save code execution steps , The heap holds objects , Data etc.
2. The stack allocates memory space during compilation ; Heap allocates memory size according to program operation
3. The stack has the principle of first in, last out , And it is a continuous memory area ; The heap is disordered , A piece of discontinuous , Controlled and released by the user
边栏推荐
- xss注入
- JVM 原理和流程简介
- 3dsmax2018 common operations and some shortcut keys of editable polygons
- AutoCAD - Center zoom
- MySQL audit log Archive
- [groovy] closure (closure parameter list rule | default parameter list | do not receive parameters | receive custom parameters)
- [Business Research Report] top ten trends of science and technology and it in 2022 - with download link
- Flink集群配置
- 3dsmax snaps to frozen objects
- AutoCAD - stretching
猜你喜欢

LeetCode之单词搜索(回溯法求解)

2021-10-29

SQL set operation

2021 higher education social cup mathematical modeling national tournament ABCD questions - problem solving ideas - Mathematical Modeling

PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low

Thematic information | carbon, carbon neutrality, low carbon, carbon emissions - 22.1.9

AutoCAD - graphic input and output

Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation

xss注入

Create a pyGame window with a blue background
随机推荐
2020-10-27
Thinking of 2022 American College Students' mathematical modeling competition
SQL set operation
[crampon programming] lintcode decoding Encyclopedia - 1100 strange printer
[Business Research Report] top ten trends of science and technology and it in 2022 - with download link
猿人学第一题
3dsmax common commands
Establish cloth effect in 10 seconds
The difference between bundle, chunk and module
次小生成树
xss注入
Variable category (automatic, static, register, external)
AutoCAD -- dimension break
Forecast report on research and investment prospects of Chinese wormwood industry (2022 Edition)
[crampon game] MC tutorial - first day of survival
Research and forecast report on China's solution polymerized styrene butadiene rubber (SSBR) industry (2022 Edition)
Minor spanning tree
AutoCAD - Document Management
Unity synergy
Pdf to DWG in CAD