Skip to main content

Garbage Collection Algorithms

2h 13m 20s
English
Paid

Master the complexities of memory management and ensure your programs run efficiently by understanding the intricacies of Garbage Collection Algorithms. This course is designed to equip you with the knowledge to tackle memory leaks and dangling pointers, which are prevalent issues in manual memory management.

Course Overview

Automatic memory management is a key feature in most modern high-level programming languages. Unlike manual memory allocation and deallocation, the garbage collector manages memory automatically, ensuring efficient usage and reuse. This course, Essentials of Garbage Collectors, delves into various techniques and algorithms in practice today.

Target Audience

Compiler Engineers

This course is particularly beneficial for compiler engineers. If you're designing a language, you'll likely need to implement a garbage collector. Even languages like Rust, known for memory safety, adopted automatic reference counting (ARC) and other collectors.

Other Engineers

If you aren't a compiler engineer, this class still holds value. Building a garbage collector is an advanced engineering task that enhances your understanding of complex systems, providing transferable skills and a deeper knowledge of data structures and algorithms.

Language Requirements

You don’t need to rely exclusively on C or C++ for this project. Although they are excellent for raw memory manipulations, this course focuses on theoretical aspects and generic design algorithms. Implement these concepts in any language, such as JavaScript, Python, or Rust.

Most algorithms are presented in generic pseudo-code to facilitate porting to any programming language.

Course Structure

  • Concise Lectures: Each lecture is focused and to-the-point, concentrating solely on relevant content.
  • Animated Presentations: Dynamic visuals and live-editing notes help simplify complex topics, avoiding the limitations of static slides.

Recommended Reading

Augment your learning with these recommended books:

  • The Garbage Collection Handbook: The Art of Automatic Memory Management by Antony Hosking, Eliot Moss, and Richard Jones
  • The Compiler Design Handbook: Optimizations and Machine Code generation by Y.N. Srikant, Priti Shankar

Course Requirements

Requirements:
  • Understanding of basic data structures and algorithms (trees, graphs, linked lists, etc.)
  • Basic knowledge of computer memory (bytes, addresses, pointers)

Intended Learners

Who this course is for:
  • Compiler engineers
  • Engineers eager to learn about sophisticated memory management algorithms and apply their generic knowledge to other systems

Learning Outcomes

What you'll learn:

  • Foundations of Automatic Memory Management algorithms and data structures
  • History and types of memory management: Static, Stack, Heap allocations
  • Virtual memory concepts and Memory Layout
  • Differences between Tracing and Direct collectors
  • Understanding Semantic and Syntactic garbage
  • Implementing various collectors: Mark-Sweep, Mark-Compact, Reference counting, Copying, Generational
  • Exploring Parallel, Incremental, and Concurrent collectors
  • Tri-color abstraction and its role in marking
  • GC Barriers and their application

About the Authors

Dmitry Soshnikov

Dmitry Soshnikov thumbnail
Dmitry Soshnikov is a software engineer, lectures on various topics of computer science. He is passionate about education and has a strong focus on high quality educational content: concise and clear animated lectures with real-time notes.

udemy

udemy thumbnail
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

Watch Online 17 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 17 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Allocation types
All Course Lessons (17)
#Lesson TitleDurationAccess
1
Allocation types Demo
05:07
2
Manual memory management
03:56
3
Object header
03:20
4
Virtual memory and Memory layout
08:58
5
Mutator, Allocator, Collector
04:36
6
Allocators: Free-list vs. Sequential
08:57
7
Semantic vs. Syntactic garbage
04:43
8
Tracing vs. Direct collectors
06:10
9
Mark-Sweep collector
07:43
10
Mark-Compact collector
10:17
11
Copying collector
11:02
12
Reference counting collector
09:47
13
Generational collector
08:38
14
Mark-Region GC: Immix collector
12:59
15
Parallel, Incremental, Concurrent GC
07:22
16
Tri-color abstraction
07:32
17
GC barriers
12:13
Unlock unlimited learning

Get instant access to all 16 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription