当前位置:网站首页>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
边栏推荐
- The principle of attention mechanism and its application in seq2seq (bahadanau attention)
- SQL set operation
- Special information | finance, accounting, audit - 22.1.23
- Flutter tips: various fancy nesting of listview and pageview
- Unity connects to the database
- 2022 thinking of mathematical modeling D problem of American college students / analysis of 2022 American competition D problem
- 49 pictures and 26 questions explain in detail what is WiFi?
- 2021 huashubei mathematical modeling idea + reference + paper
- 2021 electrician Cup - high speed rail traction power supply system operation data analysis and equivalent modeling ideas + code
- 【acwing】836. Merge sets
猜你喜欢
[Business Research Report] top ten trends of science and technology and it in 2022 - with download link
[Business Research Report] Research Report on male consumption trends in other economic times -- with download link
669. Prune binary search tree ●●
计组笔记(1)——校验码、原补码乘除计算、浮点数计算
3dsmax scanning function point connection drawing connection line
Introduction to JVM principle and process
用 Jmeter 工具做个小型压力测试
2021 higher education social cup mathematical modeling national tournament ABCD questions - problem solving ideas - Mathematical Modeling
[groovy] closure (closure as function parameter | code example)
Unity parallax infinite scrolling background
随机推荐
2020-10-27
This article is good
An article takes you to thoroughly understand descriptors
Introduce Hamming distance and calculation examples
中国金刚烷行业研究与投资预测报告(2022版)
AutoCAD - isometric annotation
Wenet: E2E speech recognition tool for industrial implementation
Decryption function calculates "task state and lifecycle management" of asynchronous task capability
AutoCAD -- dimension break
Panel panel of UI
[PCL self study: feature9] global aligned spatial distribution (GASD) descriptor (continuously updated)
【Leetcode】1352. 最后 K 个数的乘积
Flink cluster configuration
[groovy] closure (closure as function parameter | code example)
3dsmax common commands
The difference between bundle, chunk and module
A survey of automatic speech recognition (ASR) research
Emlog博客主题模板源码简约好看响应式
2020-10-27
质量体系建设之路的分分合合