Nicheloom visits: 58,050 all-time · 7,694 in the last 7 days

The opportunity tracker for new startups.

Today: 1,953 launches · Niche of the day: specialized calculation tools · See what launched today →

I wrote a minimal memory allocator in C

Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.

Want to reach these readers? Sponsor an issue.

A fun toy memory allocator (not thread safe, that's a future TODO). I also wanted to explain how I approached it, so I also wrote a tutorial blog post (~20 minute read) covering the code which you can find the link to in the README.

HN · launched Nov 23, 2025 · 137 upvotes (top 7%) · 0 views

Niche: specialized algorithms and computing libraries · 230 launches, 4 in the last 7 days ▼ -73% · Explore this niche →

Category and tags

  • Horizontal
  • Dev tools
  • Developer
  • Not AI
  • Hobby / open-source project

Visit website ↗ Source listing ↗

Could you build this?

Yes A non-thread-safe toy memory allocator using basic `sbrk` or `mmap` syscalls in C is a standard computer science educational project that LLMs can generate and explain flawlessly.

Discussion

20 comments analyzed.

Competitors mentioned: C standard library malloc/free, jemalloc, tcmalloc, mimalloc

Concerns raised: Unspecified/non-portable behavior mixing brk()/sbrk() with other memory functions, realloc() has inconsistencies and corner cases with mmapped blocks, Missing overflow checks on size+META_SIZE in multiple spots, Not suitable for general-purpose library use due to application-specific assumptions, Single-threaded only, performance concerns with large fragmentation scenarios

Feature requests: Add static keyword to internal functions and constants for proper encapsulation, Add overflow checks for size+META_SIZE operations, Improve realloc() handling of mmapped blocks during shrinking, Only track freed nodes in free_list, not all nodes, Add more const qualifiers for clarity

Competitors

Other products that read as similar to this one : 251 launches clear the similarity bar, closest 8 shown.

Attention rank: #24 of 252 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).

Launched 23 days after the earliest competitor.

The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.