from Hacker News

Visualizing Garbage Collection Algorithms

by silentbicycle on 9/3/14, 4:30 PM with 22 comments

  • by mnemonik on 9/3/14, 9:31 PM

    If you find this interesting, you might also enjoy "A Unified Theory of Garbage Collection" by Bacon et all: http://www.cs.virginia.edu/~cs415/reading/bacon-garbage.pdf
  • by kazinator on 9/3/14, 7:11 PM

    This is useful; I've been puzzled by the actual behavior of a garbage collector. For instance, you might be dismayed, after implementing generational GC, that it benchmarks worse compared to reconfiguring for pure mark and sweep. Some visualization could help explain why. Raw execution profiling isn't all that helpful because it is entangled with the program, so you have to rely on collecting and logging various statistics from the collector.
  • by azmenthe on 9/3/14, 6:33 PM

    Very cool, it would be nice if the animations looped though!
  • by sriku on 9/4/14, 5:54 PM

    On a total tangent, I've never been satisfied with the analogy of "garbage collection" for what memory managers do ... and tried to come up with something better [1]. Not surprisingly, it came up when I was actually washing dishes :)

    [1] http://sriku.org/blog/2014/07/06/dish-washing-versus-garbage...

  • by bengali3 on 9/3/14, 6:30 PM

    nice. Shows why forcing GC frequently can be counter productive, esp with the copy collector
  • by agersant on 9/3/14, 6:51 PM

    Looks great! Thanks for making this.
  • by molixiaoge on 9/4/14, 12:59 AM

    great
  • by molixiaoge on 9/4/14, 12:58 AM

    ss
  • by frozenport on 9/4/14, 2:23 AM

    Obligatory Quote:

    "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell

    Interestingly, this doesn't apply to Scala.