Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
OT: Alloca in Java, was Re: [cdt-dev] Post 2.0 milestones

Douglas Schaefer wrote:
Now if only I can alloca in Java...

I don't know about other VMs, but at least JRockit does roughly that for objects that are used only locally. If the optimizer can prove that an object doesn't escape its current stack frame, the used fields of the object are put in registers and the object never reaches the heap (and thus doesn't have to be garbage collected either). Fields that can't be put in registers are spilled onto the stack.

  //Johan


Back to the top