We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

Learn Memory Management in C

Get close to the metal: pointers, the stack, the heap, and a tiny garbage collector you build yourself.

What you'll learn in this C course

Memory management is something that every programmer needs to deal with and understand at some point. If you're used to working with languages and tools that handle it for you, this course will teach you how all that works under the hood. You'll even build your own garbage collectors from scratch. This course will teach you the C basics you need for the course, but it's not a course about C, it's about memory.

Chapter List

1
C Basics
Introduction to the basics of the C programming language
2
Structs
Understand how C structs work and how they're laid out in memory
3
Pointers
You thought pointers were hard? Wrong. Let's figure them out together.
4
Enums
Learn how to use enums (enumerations) in C to create a set of named constants.
5
Unions
Unions in C are not the same as they are in TypeScript. Let's grok C unions.
6
Stack and Heap
Understand the difference between allocating memory on the stack and the heap
7
Advanced Pointers
Let's practice some more advanced pointer concepts - like pointers to pointers
8
Stack Data Structure
Build a stack in C using structs and pointers and understand where the memory is allocated
9
Objects
Implement your own object system for later use in your garbage collection algorithms
10
Refcounting GC
Implement a simple reference counting garbage collector from scratch in C
11
Mark and Sweep GC
Implement a basic mark and sweep garbage collector and understand its tradeoffs with refcounting

Join 35,562 students in the Learn Memory Management in C course

Read reviews of their learning experiences

i think it gets tedious sometimes !! . but overall a good course . worth the time . even better if try to binge ! .

(3/5)
Rahul Upadhyay profile image

Rahul Upadhyay

India

This is such an amazing course! It definitely sparked my interest in learning more about C/C++ programming. Above all, it thought me more about pointers than any other course I've taken before.

(5/5)
Marcelo Borges profile image

Marcelo Borges

Germany

It is a good course but a lot of the content should have been presented upfront, in-depth, in a video before we go to piece-by-piece implementation. The way it is presented here makes it easy to follow the "next" step but you're always lost on the specifics of what is the greater picture going on. I wish I there was more substance to the ideas and even history of the content showed before we get to implement. In general, the course tests are a bit lenient but the coding part doesn't need more.

(4/5)
Rodrigo Meireles profile image

Rodrigo Meireles

Brazil

hardest course I've taken on boot.dev so far, really shows how much nicer it is to work with a high level language but I appreciate the low abstraction when working with C :)

(5/5)
Andre  profile image

Andre

Philadelphia, PA

Tough as nails, but honestly felt I learnt a lot of stuff I would have never otherwise. Huge amount more of respect gained for what's going on under the hood.

(5/5)
Ryan Royals profile image

Ryan Royals

Adelaide, Australia

Before doing this course I didn't really understand what is a Stack or a Heap that well, this helped a lot into getting more understanding on what are their diferences. It was also very cool to code in C and learn how to do a basic GC.

(5/5)
Luigi Minardi profile image

Luigi Minardi

Europe

Real frustrating experience.

(4/5)
Matt Stankovich profile image

Matt Stankovich

Canada

This course was really challenging for me but now I'm more conscious abot the performance of my codes.

(5/5)
Enes Yıldırım profile image

Enes Yıldırım

Turkey

Great intro to C and memory management. I've always wanted to learn C and lower level programming, and this was a great way to get started.

(5/5)
Zachary Taylor profile image

Zachary Taylor

United States

Showing 1-9 of 595

or view more reviews

Mediocrity doesn't cut it anymore

The only way to become a great developer is to write a lot of code

Avoid tutorial hell

by writing a ton of code

Stay motivated with

a game-like curriculum

Build portfolio projects

to prove your skills

Delve deeper

into foundational concepts

Learn flexibly online

without interrupting your life

For 1% the price of college

to minimize your financial risk

Frequently asked Questions

Got questions? We've got answers

Yes! It's free to create an account and start learning. You'll get all the immersive and interactive features for free for a few chapters. After that, if you still haven't paid for a membership, you'll be in read-only (content only) mode.