DEV Community

Cover image for Glibc Heap Overview
Md. Monowarul Amin 200042112
Md. Monowarul Amin 200042112

Posted on

Glibc Heap Overview

🧩 Understanding the Glibc Heap: Allocation, Tcache & Safe-Linking Explained

Ever wondered what happens under the hood when you call malloc() or free() in C?
This post dives deep into the Glibc Heap memory management system, breaking down how allocations, deallocations, and internal bin structures work — with detailed visuals from Glibc 2.39.

From understanding the memory layout (stack, heap, data, text) to decoding the Safe-Linking mechanism that protects modern systems from heap exploitation — this presentation provides a complete, hands-on overview for learners, reverse engineers, and security researchers.

📘 What You’ll Learn

🔹 How heap memory is structured in Linux

🔹 The role of malloc() and free() in Glibc

🔹 How tcache improves performance with LIFO-based chunk reuse

🔹 The machine-level layout of heap chunks and metadata

🔹 How Safe-Linking obfuscates forward pointers for security

🔹 Techniques to properly compute and overwrite safe-linked addresses

👉 Download the Full PDF

Top comments (0)