FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Creating my first malloc - Phase 1 Mini Malloc
How-ToTools

Creating my first malloc - Phase 1 Mini Malloc

via Dev.tomoonlitpath3h ago

In this part, I am going to make a simple bump allocator that just allocates memory. The file created is called malloc_v1.c Note : The clues I mention below were given to me by an AI assistant, used purely to guide my understanding of concepts and syntax. The entire code is written by me, referencing the official glibc documentation throughout. I'm mentioning this explicitly because I believe in being honest about the learning process. The entire process and my code has been uploaded on my github account: [ https://github.com/moonlitpath1/mini-malloc ] Clues that I've got: Create mymalloc.c . You need **two * functions (not one):* #include <unistd.h> #include <stddef.h> void * malloc ( size_t size ) { // your 3-line bump allocator here } void free ( void * ptr ) { // intentionally empty for now — but must exist } Why does free need to exist even empty? When ls runs, it calls free() on memory it allocated. If you don't provide free , your .so has no free symbol, so the linker falls back

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles

I Learned More in 3 Months Than 3 Years (The System That Actually Works)
How-To

I Learned More in 3 Months Than 3 Years (The System That Actually Works)

Medium Programming • 3h ago

CA 12 - Next Permutation
How-To

CA 12 - Next Permutation

Dev.to • 3h ago

The Automation Trap: Why Everyone Wants to Scale but No One Knows What They’re Building
How-To

The Automation Trap: Why Everyone Wants to Scale but No One Knows What They’re Building

Medium Programming • 3h ago

How to Add Interior Materials to Chaos Fracture Geometry Collections
How-To

How to Add Interior Materials to Chaos Fracture Geometry Collections

Medium Programming • 3h ago

How to Back Up Your Android Phone (2026)
How-To

How to Back Up Your Android Phone (2026)

Wired • 5h ago

Discover More Articles