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
Coalescing - Phase 5 Mini Malloc
How-ToTools

Coalescing - Phase 5 Mini Malloc

via Dev.tomoonlitpath2h ago

This is the fifth phase of malloc. Here, I have implemented block coalescing. This was very interesting and a fun phase. Block coalescing helps in reusing memory Note : The clues and guidance 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: This is the most intellectually satisfying phase. You're about to fix the opposite problem — **external fragmentation : adjacent free blocks that could be one big block but aren't. [meta|FREE 64][meta|FREE 128][meta|USED 32] If someone asks for malloc(100) — your find_free_block skips both free blocks since neither is ≥ 100 alone. But together they're 192 bytes. Coalescing **merge

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

Do you want to build a robot snowman?
How-To

Do you want to build a robot snowman?

TechCrunch • 2h ago

I Haven’t Written Real Code in 3 Months. My Products Still Ship.
How-To

I Haven’t Written Real Code in 3 Months. My Products Still Ship.

Medium Programming • 5h ago

My Learning Experience with Sorting Algorithms
How-To

My Learning Experience with Sorting Algorithms

Dev.to Tutorial • 7h ago

Stop Building Projects. Start Building Systems.
How-To

Stop Building Projects. Start Building Systems.

Medium Programming • 7h ago

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 • 8h ago

Discover More Articles