Skip to content

Memory

Write a short intro on why it's important for a C++ programmer to learn about memory management and how important it is overall comparing to other computer resources. Mention how wise memory management leads not only to the performance improvements, but also better software design practice.

The primary goal of a low-level programming language is to manage memory resource. If your language allows you to reason about the memory layout, how your data structures are organized in memory, then it's a low-level language.

Memory is a resource available to a developer immediately. No special initialization is necessary, we just have to declare a variable.

Memory is a primary hardware resource. Forget about performance or great software design when your memory is a mess. Even the fastest CPU won't help you save face.

What are low-level languages ?

Low-level languages allow you to reason about your memory structure. High-level languages hide these details. This is the main reason between the two categories.

Summary of C++ memory lib.

  • std::shared_ptr

  • std::unique_ptr