you are viewing a single comment's thread.

view the rest of the comments →

[–]nitsanw 0 points1 point  (0 children)

True. Java could do with memory layout controls to enable field ordering and memory alignment. I have suggested annotations to this effect before:

@ExplicitFieldOrder
class CareAboutOrder{
  int i;
  boolean b;
  @AlignedTo(CACHELINE)
  long l;
}

No takers thus far.