当前位置:网站首页>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
边栏推荐
- Unity get component
- Autocad-- dynamic zoom
- Function overloading
- Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 006 unity toolbar
- 次小生成树
- 中国艾草行业研究与投资前景预测报告(2022版)
- Forecast report on research and investment prospects of Chinese wormwood industry (2022 Edition)
- AutoCAD - isometric annotation
- 介绍汉明距离及计算示例
- PostgreSQL surpasses mysql, and the salary of "the best programming language in the world" is low
猜你喜欢

Autocad-- Real Time zoom

Emlog博客主题模板源码简约好看响应式
![[groovy] closure (closure call | closure default parameter it | code example)](/img/61/754cee9a940fd4ecd446b38c2f413d.jpg)
[groovy] closure (closure call | closure default parameter it | code example)

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

Looking at Chinese science and technology from the Winter Olympics: what is the mystery of the high-speed camera that the whole people thank?

AutoCAD - Center zoom

介绍汉明距离及计算示例

【acwing】836. Merge sets

Séparation et combinaison de la construction du système qualité

54. 螺旋矩阵 & 59. 螺旋矩阵 II ●●
随机推荐
China as resin Market Research and investment forecast report (2022 Edition)
Unity get component
Flink cluster configuration
中国AS树脂市场调研与投资预测报告(2022版)
AutoCAD - command repetition, undo and redo
Group counting notes (1) - check code, original complement multiplication and division calculation, floating point calculation
The difference between bundle, chunk and module
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
[groovy] closure (closure as function parameter | code example)
Use assimp library to read MTL file data
Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 006 unity toolbar
Manually implement heap sorting -838 Heap sort
775 Div.1 B. integral array mathematics
An article takes you to thoroughly understand descriptors
PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
【Leetcode】1352. 最后 K 个数的乘积
[crampon game] MC tutorial - first day of survival
Thematic information | carbon, carbon neutrality, low carbon, carbon emissions - 22.1.9
775 Div.1 C. Tyler and strings combinatorial mathematics
How to choose a panoramic camera that suits you?