Compiler issue...

Alexandre Oliva oliva at dcc.unicamp.br
Wed Jan 27 11:30:10 PST 1999


On Jan 27, 1999, Maxim Kizub <max at immsp.kiev.ua> wrote:

> But this _does_ allocates 'data', which is at least double :-(

Nope, because the size of these structures is never used directly.
Instead, Kaffe uses the offset of the align field (i.e., the size of
whatever precedes it, including any needed padding) plus the number of 
elements in the array times the size of each particular element.

But I agree that we could get rid of the padding for types that don't
need it.  It would just take a switch/case on primitive types in
newArray(), and different offsets for each array indexing bytecode in
kaffe.def.

-- 
Alexandre Oliva  http://www.dcc.unicamp.br/~oliva  aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil



More information about the kaffe mailing list