Software Engineering KB

Home

❯

02 Programming Languages and Paradigms

❯

03 Memory Models

❯

01 Concept

❯

Mark and Sweep

Mark-and-Sweep

Feb 10, 20261 min read

  • memory-models
  • gc
  • mark-and-sweep

Mark-and-Sweep

← Back to Garbage Collection (GC)

A GC algorithm with two phases: mark (trace all reachable objects starting from roots) and sweep (free all unmarked/unreachable objects). Simple and handles cycles naturally, but requires stopping the world during collection and can cause fragmentation.

Key Properties

  • Trace Reachable Objects
  • Free Unreachable

memory-models gc mark-and-sweep


Graph View

  • Mark-and-Sweep
  • Key Properties

Backlinks

  • Garbage Collection (GC)
  • Free Unreachable
  • Trace Reachable Objects

Created with Quartz v4.5.2 © 2026

  • GitHub