Mog9 / Memory-Allocator
PublicCustom memory allocator in C++ built from scratch using mmap. Allocates a 1MB memory pool upfront and carves blocks from it to keep all allocations contiguous. Implements malloc, free, block reuse via free list, and coalescing of adjacent free blocks without any standard library allocation functions.
An educational C++ program demonstrating a custom system for allocating, reusing, and merging memory spaces without relying on standard library functions.
How It Works
You stumble upon a simple educational program that shows how computers handle space for storing data.
You download the few easy files that make up this learning tool.
With one easy step, you prepare the program to run on your computer.
You launch the program and watch it create, use, and release spaces for numbers.
You notice that after releasing a space, the program reuses the exact same spot for new data.
The program smartly combines nearby empty spaces into one bigger area for larger needs.
You now understand how computers efficiently manage and reuse their limited space for data, feeling smarter about programming basics.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.