当前位置:网站首页>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
边栏推荐
- Rip notes [rip three timers, the role of horizontal segmentation, rip automatic summary, and the role of network]
- 猿人学第一题
- [ideas] 2021 may day mathematical modeling competition / May Day mathematical modeling ideas + references + codes
- 2022 U.S. college students' mathematical modeling e problem ideas / 2022 U.S. game e problem analysis
- 3dsmax scanning function point connection drawing connection line
- 【acwing】240. food chain
- 2022 thinking of mathematical modeling C problem of American college students / analysis of 2022 American competition C problem
- Data security -- 14 -- Analysis of privacy protection governance
- Understand encodefloatrgba and decodefloatrgba
- 质量体系建设之路的分分合合
猜你喜欢

AutoCAD - scaling

On-off and on-off of quality system construction

JVM 原理和流程简介

数论函数及其求和 待更新

2021-10-29

3dsmax scanning function point connection drawing connection line
![[goweb development] Introduction to authentication modes based on cookies, sessions and JWT tokens](/img/20/5c5550e6dabc76702f0e7ce3bef068.jpg)
[goweb development] Introduction to authentication modes based on cookies, sessions and JWT tokens
![[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)](/img/90/0cf08ae6fea61891e3e1fdf29d310c.jpg)
[groovy] closure (closure parameter binding | curry function | rcurry function | ncurry function | code example)

AutoCAD - Document Management

Redis 排查大 key 的4种方法,优化必备
随机推荐
PostgreSQL 超越 MySQL,“世界上最好的编程语言”薪水偏低
中国艾草行业研究与投资前景预测报告(2022版)
Create a pyGame window with a blue background
Unity get component
【Leetcode】1352. 最后 K 个数的乘积
AutoCAD - feature matching
Pdf to DWG in CAD
Private collection project practice sharing [Yugong series] February 2022 U3D full stack class 006 unity toolbar
中国针状焦行业发展研究与投资价值报告(2022版)
#775 Div.1 C. Tyler and Strings 组合数学
Emlog blog theme template source code simple good-looking responsive
54. 螺旋矩阵 & 59. 螺旋矩阵 II ●●
669. Prune binary search tree ●●
Establish cloth effect in 10 seconds
[groovy] closure (Introduction to closure class closure | this, owner, delegate member assignment and source code analysis)
Interface joint commissioning test script optimization V5.0 (end)
质量体系建设之路的分分合合
SQLServer 存储过程传递数组参数
JMeter -- distributed pressure measurement
Number theoretic function and its summation to be updated