Implement a Simple malloc / Free List

Problem

Sketch a custom malloc/free over a fixed memory arena: maintain a free list, split and coalesce blocks.

Example

alloc(16), alloc(32), free(first), alloc(16) reuses the freed block

Constraints

  • Avoid fragmentation where possible

What to look for

Understanding of heap mechanics, headers, alignment, and coalescing.

added …
LeaderboardSalaryAccount