by paavohtl · 6y ago · 0 comments
This is about stack allocation of objects where safe (i.e. when you can prove they don't escape the local scope) for Hotspot, something that already exists in J9 (IBM's JVM) I think.
There is equivalent work for .net core here: https://github.com/dotnet/runtime/blob/master/docs/design/co...
(So the title is somewhat accurate, but you have to do some digging)
> In .NET instances of reference types are allocated on the garbage-collected heap.
> If the lifetime of an object is bounded by the lifetime of the allocating method, the allocation may be moved to the stack.
https://github.com/dotnet/runtime/blob/master/docs/design/co...