Memory Management
Everything on SkillVeris tagged Memory Management — collected across the glossary, study notes, blog, and cheat sheets.
66 resources across 2 libraries
Cheat Sheets(1)
Interview Questions(65)
What is External Sorting?
External sorting is a family of algorithms for sorting data too large to fit in main memory, most commonly external merge sort: split the data into memory-size…
What is a Copy Constructor?
A copy constructor is a special constructor that creates a new object as a duplicate of an existing object of the same class, copying its field values into the…
What is a Destructor in OOP?
A destructor is a special member function invoked deterministically when an object goes out of scope or is explicitly deleted, releasing resources such as memo…
What is a Finalizer in OOP?
A finalizer is a method a garbage-collected runtime may call on an object before reclaiming its memory, intended as a last-resort cleanup hook, but its executi…
What is RAII (Resource Acquisition Is Initialization)?
RAII is a C++ idiom where a resource (memory, a file handle, a lock) is acquired in an object’s constructor and automatically released in its destructor, so th…
How Does Garbage Collection Relate to OOP?
Garbage collection is an automatic memory-management strategy that reclaims heap memory occupied by objects once a language’s runtime determines no live refere…
What is a Smart Pointer?
A smart pointer is a class template that wraps a raw pointer and automatically manages the lifetime of the object it points to, deallocating it when it is no l…
RAII vs Garbage Collection
RAII (Resource Acquisition Is Initialization) ties a resource’s lifetime deterministically to an object’s scope so it is released the instant that object is de…
What is a Shallow Copy?
A shallow copy creates a new object and copies the values of the original object’s fields into it, but for any field that is itself a reference to another obje…
What is a Deep Copy?
A deep copy creates a completely independent duplicate of an object, recursively copying every nested object it references as well, so the original and the cop…
Move Semantics vs Copy Semantics
Copy semantics duplicates an object’s resources so the source and destination each own independent data, while move semantics transfers ownership of a source o…
What is a Move Constructor?
A move constructor is a special constructor (in C++, T(T&& other)) that builds a new object by transferring ownership of an existing rvalue object’s internal r…
What is the Rule of Three in C++?
The Rule of Three states that if a C++ class defines any one of a custom destructor, copy constructor, or copy assignment operator, it almost certainly needs t…
What is the Rule of Five in C++?
The Rule of Five extends the Rule of Three for modern C++ by stating that a resource-owning class should typically define all five special member functions tog…
Difference Between Process and Thread
A process is an independent program in execution with its own private memory space, while a thread is a lighter unit of execution that lives inside a process a…
Difference Between Paging and Segmentation
Paging divides memory into fixed-size blocks called pages (mapped to equal-size frames in physical memory), while segmentation divides memory into variable-siz…
What is Virtual Memory?
Virtual memory is a technique that gives each process the illusion of a large, private, contiguous address space by mapping virtual addresses to physical RAM (…
What is Thrashing in Operating Systems?
Thrashing is a state where a system spends most of its time swapping pages between RAM and disk rather than executing actual instructions, causing CPU utilizat…
What is a Page Fault?
A page fault is a hardware trap raised by the MMU when a running program accesses a virtual memory page that is not currently mapped to a physical frame, forci…
What is Demand Paging?
Demand paging is a virtual memory technique where a page is loaded into physical memory only when a process actually references it, rather than loading the who…
What Is Fragmentation?
Fragmentation is the wasted memory that builds up as blocks are allocated and freed over time, leaving usable space scattered in pieces too small or too oddly…
What is the LRU Page Replacement Algorithm?
Least Recently Used (LRU) page replacement evicts the page that has gone the longest without being referenced, on the assumption that pages accessed far in the…
What is the FIFO Page Replacement Algorithm?
First-In-First-Out (FIFO) page replacement evicts the page that has been resident in memory the longest, regardless of how recently or frequently it has actual…
What is the Optimal (OPT/Belady’s) Page Replacement Algorithm?
The Optimal page replacement algorithm — also called OPT or Belady’s algorithm — evicts the page that will not be used for the longest time in the future, whic…
Showing 24 of 65.