Memory management

  • Sprouting
  • c.

Memory management is the process of coordinating system memory (typically RAM) during program execution to ensure efficient allocation, usage, and deallocation. Usually, memory management refers only to heap memory, opposed to stack memory.

There are a number of strategies for managing memory, such as automatic runtime strategies like ARC and “garbage collection”, as well as compile-time strategies like Rust’s “borrow checker”.

In some languages, such as C/C++, the program needs to explicitly allocate, use, and deallocate memory. This allows programs to be very performant with regards to how memory is utilised, but comes with a higher risk of introducing bugs, such as memory leaks.


Backlinks