Every C programmer uses malloc().
Very few understand what actually happens behind the scenes.
Does malloc allocate RAM directly?
Does it call the kernel every time?
Where does virtual memory fit in?
What triggers a page fault?
In this video, we trace malloc step-by-step — from your C program in user space,
through glibc internals, into the Linux kernel, and finally to physical memory.
📌 What you’ll learn in this video:
• What malloc() really does (and what it doesn’t)
• Why malloc is NOT a system call
• How glibc manages heap memory
• brk() vs mmap() — when and why each is used
• Virtual memory, page tables, and page faults
• When physical RAM is actually allocated
• How Linux makes memory “real” on first access
This video is perfect for:
✔ Embedded engineers
✔ Linux developers
✔ C / C++ programmers
✔ OS & kernel learners
✔ Interview preparation (system programming)
If you’ve ever used malloc() without fully understanding it —
this video will change how you see memory forever.
🔔 Subscribe to TechDhaba for deep-dive systems programming content
💬 Comment if you want a follow-up on free(), fragmentation, or writing your own malloc
#malloc #linux #memorymanagement #cprogramming #operatingsystems #kernel #embeddedlinux #systemsprogramming