MEMALLOC

MCS 376 · 2026 · Flint Million PhD

// SCENARIO

You are the memory manager of a simple OS with no virtual memory.

Processes request contiguous blocks of physical memory. You decide where each one goes.

When a row fills completely, that memory is reclaimed (freed).

Goal: place as many processes as you can before running out of space. Watch how gaps build up over time.

Tip: Blocks always drop to the lowest available position in their column—you pick where, gravity does the rest.

MEMALLOC

You're the OS. Processes request contiguous memory. Place them in the grid.

Full rows are reclaimed. But gaps accumulate—and eventually, fragmentation wins.

Hover to choose a column, then click to place. Blocks drop to the lowest available row—just like real memory, you can't leave floating gaps.

OUT OF MEMORY

// INCOMING PROCESS

// STATISTICS

Processes placed 0
Rows reclaimed 0
Free cells 96
Largest gap 8
FRAGMENTATION INDEX