5 ms·
The Garbage Collection Handbook
- OptionOfT 11mo agoMy favorite story about garbage collection: https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98125 https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98...
- dana321 11mo agonow that is what i call the ultimate in garbage collection technology
- naasking 11mo agoI think the missile impact creates a lot more garbage spread over a wider area.
- whartung 11mo agoThey 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 11mo agoAnd on the Falcon 9, the hydrocarbon fuel is used as hydraulic fluid, then just dumped back into the fuel tank.
- 01HNNWZ0MV43FF 11mo agoAnd 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 11mo agoI would call that a region-based memory allocator... Only that it has a single region, ever.
- antonvs 11mo agoOr it's a generational garbage collector with the generation management and collection functionality omitted.
- eru 11mo agoWell, the garbage is collected when the missile hits the target region.
- amelius 11mo agoThe garbage is spread out over the target region.
- amelius 11mo agoYeah if you have for example a http request, you can just collect garbage you create during that request in a single region, then throw it away when the request has been handled. This is quite standard.
- Agingcoder 11mo agoIt’s pretty standard in many places I think - the point here is not the null gc but rather exact memory requirements being proved statically.
- zipy124 11mo agoThis is one of my favourite anecodtes to tell peers and colleagues because it's important when understanding buisness case/needs against programming. We all want to make perfect software, but it isn't always neccessary.
- iainctduncan 11mo agoI have this, it is very well written and thorough. Highly recommend!
- charcircuit 11mo agoI 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.
- pjmlp 11mo agoSee "Hard Realtime Garbage Collection in Modern Object Oriented Programming Languages", the author went on co-found Aicas, one of the few companies doing real time Java on embedded. https://www.amazon.de/-/en/Realtime-Collection-Oriented-Programming-Languages/dp/3831138931 https://www.amazon.de/-/en/Realtime-Collection-Oriented-Prog... https://www.aicas.com/products-services/jamaicavm/ https://www.aicas.com/products-services/jamaicavm/
- nhatcher 11mo agoGreat book. Previous discussion: https://news.ycombinator.com/item?id=35492307 https://news.ycombinator.com/item?id=35492307 (387 points, 166 comments)
- Verdex 11mo agoI 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.
- throwaway17_17 11mo agoI 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.
- bjourne 11mo agoNot much. The book mostly covers theory and not platform-specific details. The explanations on various real-time gc algorithms are very thorough though.
- dafelst 11mo agoUnreal Engine has a GC for its internal object graph, so GC is already in use in a ton of games.
- 01HNNWZ0MV43FF 11mo agoWouldn't all the popular games based on Unity and written in C# count?
- charcircuit 11mo agoMinecraft is the best selling game of all time, uses GC, and is an indie game.
- znpy 11mo agoYeah but it’s a game category where is that’s viable
- charcircuit 11mo agoWhat do you mean? A 3D game with a dynamic environment doesn't sound like the best category for GC. Or do you just mean that it was a game that didn't write extreme performance optimizations.
- Agingcoder 11mo agoThis is a truly remarkable book, and a must read for any engineer who depends on a gc . And if you don’t need a gc, the book starts by talking about allocators, which are actually very important too !
- xenophonf 11mo agoI wish there was a big, friendly "buy now" link that would get me the print book and EPUB file. The site promotes the book. I'm not sure why they don't make buying it stupid simple.