diff --git a/.zk/notebook.db b/.zk/notebook.db index fa3d331..b2af398 100644 Binary files a/.zk/notebook.db and b/.zk/notebook.db differ diff --git a/zk/Heap_memory.md b/zk/Heap_memory.md index f6cb2c1..7281185 100644 --- a/zk/Heap_memory.md +++ b/zk/Heap_memory.md @@ -7,9 +7,17 @@ created: Saturday, April 20, 2024 # Heap memory -## Summary +Along with [[Stack_memory|Stack memory]], programs make use of _heap memory_ +during runtime. -- Along with [[Stack_memory|Stack memory]], programs make use of _heap memory_ - during runtime. +Heap memory does not use a standardised data structure and can be accessed from +any point within the program. -- [ ] ## Related notes +Whereas stack memory with it's LIFO structure has memory management built-in +when programs allocate memory from the heap they must manually deallocate it +when it is no longer required. This process of "freeing memory" is known as +_garbage collection_. In a language like C, this is the explicit concern of the +programmer and is not abstracted away. Failure to properly manage garbage +collection is what causes [[Memory_leaks]]. + +## Related notes