Struct/value types + stack allocations

David Holmes david.holmes at
Tue Jan 17 19:21:55 PST 2012

Hi Vitaly,

On 18/01/2012 10:09 AM, Vitaly Davidovich wrote:
> I asked this question on hotspot-compiler dev mailing list (it was tied
> in with an escape analysis question) but Vladimir Kozlov suggested I try
> this group instead.  Copy/paste of my question:
> Also, are there any plans to support struct/value-type like (ala CLR's
> struct) constructs in the JVM (presumably java can then target it)? This
> would allow developer to control where something gets allocated without
> relying on EA, and it would also reduce the amount of indirection in
> object graphs (and the mem/cpu performance hit of them) since struct
> members of a heap allocated object could be allocated "inline".

I would say that anything in this direction would have to be driven by 
languages running on the JVM. In particular if Java doesn't propose to 
add stack-allocation (it doesn't) then it seems unlikely to me that the 
VM would add support for it. I'm pretty sure this would require new 


> Thanks
> Sent from my phone

More information about the hotspot-runtime-dev mailing list