Update summary.md
This commit is contained in:
parent
3862432cfe
commit
e641db7947
@ -14,4 +14,4 @@
|
|||||||
|
|
||||||
**Q**: Is the "heap" in data structures the same concept as the "heap" in memory management?
|
**Q**: Is the "heap" in data structures the same concept as the "heap" in memory management?
|
||||||
|
|
||||||
The two are not the same concept, even though they are both referred to as "heap". The heap in computer system memory is part of dynamic memory allocation, where the program can use it to store data during execution. The program can request a certain amount of heap memory to store complex structures like objects and arrays. When these data are no longer needed, the program needs to release this memory to prevent memory leaks. Compared to stack memory, the management and usage of heap memory demands more caution, as improper use may lead to memory leaks and dangling pointers.
|
The two are not the same concept, even though they are both referred to as "heap". The heap in computer system memory is part of dynamic memory allocation, where the program can use it to store data during execution. The program can request a certain amount of heap memory to store complex structures like objects and arrays. When the allocated data is no longer needed, the program needs to release this memory to prevent memory leaks. Compared to stack memory, the management and usage of heap memory demands more caution, as improper use may lead to memory leaks and dangling pointers.
|
||||||
|
Loading…
Reference in New Issue
Block a user