P*****f 发帖数: 2272 | 1 on 32bit platform, say, a one-dimension int array
int [] a={1,2,3};
What about the memory layout of a according to spec? suppose the starting
address for a is $a, so 0($a) is the type info? 4($a)is the length? and
followed by
elements? thx | m******t 发帖数: 2416 | 2
I doubt the JVM Spec would dictate this. 8-)
On a hunch, I would guess it's more complex than that. Arrays should be
implemented as objects.
【在 P*****f 的大作中提到】 : on 32bit platform, say, a one-dimension int array : int [] a={1,2,3}; : What about the memory layout of a according to spec? suppose the starting : address for a is $a, so 0($a) is the type info? 4($a)is the length? and : followed by : elements? thx
|
|