Latest / Learning & reference

Minimal C Memory Allocator

github.com · Open source · Maintained

Toy memory allocator in C with a tutorial write-up

Visit github.com ↗Share

  • allocator
  • low level
  • memory allocator
  • systems programming
  • c memory allocator
  • malloc implementation
  • sbrk mmap allocator
  • learn malloc
  • toy allocator c
Stars
104
Forks
0
Open issues
0
Last commit
Found
12 months ago

GitHub figures as of . They are context, not a ranking.

This is a small memory allocator written in C as a learning project, and it is not thread safe. A tutorial of about twenty minutes covers the code and is linked from the README. It suits C programmers who want to see how an allocator works.

Repository description on GitHub: “a minimal memory allocator in C”

What it does

  • Allocates small blocks with sbrk and large blocks with mmap
  • Block splitting to reduce fragmentation
  • Coalesces adjacent free blocks
  • Makefile targets for building, tests and benchmarks

Good for

  • Study how a malloc implementation is built in C
  • Link the static allocator library into a C program
  • Run the tests and benchmark for the allocator

Suits: C programmers who want to learn how an allocator works.

Worth knowing: Not thread-safe; concurrent malloc, free and realloc calls cause undefined behavior.

What you can try

Read the README on GitHub and install from source.

Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.

Found vs. released

Kip first saw Minimal C Memory Allocator on , when t9nzin posted it to Show HN. GitHub listed no published releases for t9nzin/memory when checked , so the project may ship straight from its main branch. The repository was created .

Day-7 and day-30 updates

Day 7 no new release

  • No tagged release was published in the first 7 days after it was found (GitHub release dates).
  • Show HN discussion at check time: 137 points, 32 comments. API record

Checked , later than day 7 because tracking began after.

Day 30 no new release

  • No tagged release was published in the first 30 days after it was found (GitHub release dates).
  • Show HN discussion at check time: 137 points, 32 comments. API record

Checked , later than day 30 because tracking began after.

Release timeline every entry links to its source

  1. Repository created on GitHub: t9nzin/memory
  2. Found: t9nzin posted it to Show HN. Show HN
  3. Day-7 check recorded by Kip (details)
  4. Day-30 check recorded by Kip (details)

Quick answers

When was Minimal C Memory Allocator released?
No dated release record is available. Kip found it on Show HN on 23 Nov 2025.
Is Minimal C Memory Allocator open source?
Its source is public on GitHub at t9nzin/memory; check the repository for licence terms.
What does Minimal C Memory Allocator run on?
Library, Linux, macOS.
Is Minimal C Memory Allocator free?
It is open source, so the code is free to read and run; check the licence for terms.
Is Minimal C Memory Allocator still maintained?
It had a commit or release in the last year, though not in the last 90 days, as of the latest check.

Provenance

SourceRecordLast checked
Show HNlisting
official API record
GitHub repositoryt9nzin/memory
REST API record
GitHub Releasesrelease list
REST API record

Stable ID hn-46027962. Summary drafted with AI from the source records above and checked against KipFound’s rules before publishing. Dates and release facts come only from those records.

Share

Similar tools

More in Learning & reference

Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.