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.

Log in to start the exercises. sign up · log in
  1. 2

    Off By One

    The tests pass, the sanitizer screams. One missing byte for the terminator.

    ●●●
  2. 3

    The Ghost Pointer

    A pointer handed out earlier silently points into freed memory after the array grows.

    ●●●
  3. 4

    Freed Twice

    A clone shares its strings with the original. Both owners free them. Decide who owns what.

    ●●●
  4. 5

    Cache Corruption

    Capstone: a tiny cache hides three different memory bugs. Direct the junior to fix all of them.

    ●●●