The Garbage Collection Handbook

(gchandbook.org)

192 points | by andsoitis 12 hours ago

6 comments

  • OptionOfT 11 hours ago
    My favorite story about garbage collection: https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98...
    • whartung 8 hours ago
      They do that in other places.

      As I heard the tale, on the Standard Missile, they don't recirculate the hydraulic fluid, they just spit out as the missile flies. It's a wonderful engineering solution.

      • pfdietz 7 hours ago
        And on the Falcon 9, the hydrocarbon fuel is used as hydraulic fluid, then just dumped back into the fuel tank.
        • 01HNNWZ0MV43FF 59 minutes ago
          And the SR-71 uses its fuel as coolant.

          "There was a lot we couldn't do, but we were the fastest kids on the block..."

    • Findecanor 6 hours ago
      I would call that a region-based memory allocator... Only that it has a single region, ever.
      • eru 1 hour ago
        Well, the garbage is collected when the missile hits the target region.
      • antonvs 6 hours ago
        Or it's a generational garbage collector with the generation management and collection functionality omitted.
    • dana321 8 hours ago
      now that is what i call the ultimate in garbage collection technology
  • charcircuit 10 hours ago
    I wish the author section provided what production garbage collectors the authors worked on. There's plenty of nonintuitive things you can learn in the real world, so a book including those would be both interesting and useful.
  • throwaway17_17 6 hours ago
    I see that there is a section (relatively short) on real time GC. But for anyone who has read the Handbook, how much emphasis is placed on GC in constrained environments. I have fought the urge to implement a 3D, modern AA game with GC just to prove it is viable outside all but the most resource poor platforms or the most AAAAA, cutting edge, every cycle counted, hyper optimized game. But I am transitioning to a slightly less focused area of responsibility at work and may have some free time to prototype and this may be how I spend my winter and spring free time.
    • charcircuit 28 minutes ago
      Minecraft is the best selling game of all time, uses GC, and is an indie game.
    • dafelst 1 hour ago
      Unreal Engine has a GC for its internal object graph, so GC is already in use in a ton of games.
    • 01HNNWZ0MV43FF 57 minutes ago
      Wouldn't all the popular games based on Unity and written in C# count?
    • bjourne 4 hours ago
      Not much. The book mostly covers theory and not platform-specific details. The explanations on various real-time gc algorithms are very thorough though.
  • nhatcher 9 hours ago
    Great book. Previous discussion: https://news.ycombinator.com/item?id=35492307

    (387 points, 166 comments)

  • iainctduncan 11 hours ago
    I have this, it is very well written and thorough. Highly recommend!
  • Verdex 8 hours ago
    I had Hosking as a professor. Iirc, it was an okay experience. Compilers course I believe.

    When the handbook came out, I bought it because "hey, I know that guy". Ultimately, I don't think it's necessary, but having a more in depth knowledge of garbage collection and the problems in the space occasionally comes in handy.

    For example, what implication do finalizers have on garbage collection design? Reading about that was kind of an eye opener.