Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by bloat on Friday September 17, 2021 @07:14AM
(#28563968)
You don't see any benefits to garbage collection at all? Would you even prefer to do your own memory management if you had a magic GC which never paused? I'd be interested in your reasoning if so.
[ Parent
| on HN ]
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by snovv_crash on Friday September 17, 2021 @07:38AM
(#28564216)
Memory isn't the only limited resource which needs to be managed. File handles, network ports, etc. all all need proper design to avoid leaks. If you are used to only the allocation and never the cleanup, your design style won't hand effective management of these other types of resources for which GC isn't an option.
I'd use Java if it let me annotate when I want things to be deleted.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by ncmncm on Friday September 17, 2021 @07:32AM
(#28564158)
I'm perfectly happy to have all you lot depending on GC.
And, I don't "do my own memory management". I just don't rely on a GC to do it.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by taejo on Friday September 17, 2021 @07:44AM
(#28564263)
It may be constructive to say what you do do, instead of leaving us to guess and telling us we're wrong.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by ncmncm on Friday September 17, 2021 @07:51AM
(#28564339)
I mostly use "}".
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by post-it on Friday September 17, 2021 @08:47AM
(#28564815)
You write programs so short and uncomplex that you rarely need to free memory?
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by BenjiWiebe on Friday September 17, 2021 @09:29AM
(#28565233)
I interpret it as meaning they don't use dynamic memory allocation.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by ncmncm on Friday September 17, 2021 @05:49PM
(#28571280)
False. Use of dynamic memory allocation without GC, without reference-counting (which is GC) and without manual memory management is the usual practice in C++ and Rust.
Reference-counting GC is available when it is not too costly, which is common, and more convenient, which is rare. Ordinary automatically-generated destructors handle almost everything, almost all the time. Once in a great while, performance demands a concession such as an arena allocator, which also is not "manual memory management", and also not GC, and is radically cheaper than either one.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by pwdisswordfish8 on Friday September 17, 2021 @09:15AM
(#28565097)
Ever heard of RAII?
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by maleldil on Friday September 17, 2021 @10:31AM
(#28565925)
That's still memory management, because you need to worry about lifetimes.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by ncmncm on Friday September 17, 2021 @05:50PM
(#28571289)
It is automated, not manual, memory management. Just not GC.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses
by hiptobecubic on Friday September 17, 2021 @11:46AM
(#28566835)
You only need to worry that data that you need doesn't go out of scope.