4 ms·
I don't understand the "and C#" part. C# has had stack allocation support (for primitives, structs and fixed size arrays) since the very first release.
by paavohtl 6y ago
I don't understand the "and C#" part. C# has had stack allocation support (for primitives, structs and fixed size arrays) since the very first release.
- OnlyOneCannolo 6y ago> This document describes work to enable object stack allocation in .NET Core. > 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/coreclr/jit/object-stack-allocation.md https://github.com/dotnet/runtime/blob/master/docs/design/co...
- deleted 6y ago[deleted]
- shellac 6y agoYou'll find the detail in https://github.com/microsoft/openjdk-proposals/blob/master/stack_allocation/Stack_Allocation_JEP.md https://github.com/microsoft/openjdk-proposals/blob/master/s... 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/coreclr/jit/object-stack-allocation.md https://github.com/dotnet/runtime/blob/master/docs/design/co... (So the title is somewhat accurate, but you have to do some digging)