Systems

Custom malloc() Implementation in C

Two replacements for malloc, free, calloc and realloc that manage a static memory pool: a minimal first-fit allocator and an advanced segregated free-list allocator. The advanced tier uses Knuth boundary tags for immediate coalescing in both directions plus block splitting, and each tier has its own unit tests and stress harness.

Stack
C11, Make
Code
github.com/ADM1SH/custom-malloc---c-

Overview

Install

To build both allocator binaries with their unit test runners:

make all

Build individual targets:

make min    # Builds mymalloc_min executable
make adv    # Builds mymalloc_adv executable

Clean build artifacts:

make clean

Updates

  • docs: update README with comprehensive documentation
  • docs: expand README to open source standards
  • docs: add detailed README with project overview and build instructions
  • Add comments to all source and build files
  • Add .gitignore and remove compiled files

Docs

The full documentation covers how it works, configuration and results.