2 ms·
> Very few production multithreaded generational GCs use per-thread nurseries. > Per-thread nurseries is a shit idea unless your language has extra-super-high
by pcwalton 9y ago
> Very few production multithreaded generational GCs use per-thread nurseries.
> Per-thread nurseries is a shit idea unless your language has extra-super-high levels of infant mortality.
Isn't that what TLABs are? HotSpot uses TLABs by default, unless my info is out of date… For example, [1] shows the generated assembler for object allocation, which uses nonatomic pointer bumps.
I think we might be talking about different things by "per-thread nurseries". All I mean by a "per-thread nursery" is a TLAB.
[1]: https://shipilev.net/jvm-anatomy-park/4-tlab-allocation/ https://shipilev.net/jvm-anatomy-park/4-tlab-allocation/
- pizlonator 9y agoLike I said, you're thinking thread-local caches. TLABS are thread-local caches, not per-thread nurseries. There's a HUGE difference between a thread-local cache (which everyone uses and which you cite) and per-thread nurseries (which are an obscure idea that hardly anybody likes).
- pcwalton 9y agoYes. Apologies for using the wrong terminology :)