coursesMemory: who owns what
Memory: who owns what
Leaks, dangling pointers, double frees, overflows. Learn to read what the memory checker says and tell the model exactly who owns every byte.
-
1
The Leaky Logger
A function allocates, nobody frees. Find the owner and make the junior release the buffer in the right place.
-
2
Off By One
The tests pass, the sanitizer screams. One missing byte for the terminator.
-
3
The Ghost Pointer
A pointer handed out earlier silently points into freed memory after the array grows.
-
4
Freed Twice
A clone shares its strings with the original. Both owners free them. Decide who owns what.
-
5
Cache Corruption
Capstone: a tiny cache hides three different memory bugs. Direct the junior to fix all of them.