class gc

Per Bothner bothner@cygnus.com
Mon Mar 1 12:01:00 GMT 1999


> hmm... what objects besides classes can gcj allocate statically? String
> literals?

String literals can only be allocated statically if you do link-time
merging (since Strings have to be interned). This is difficult
when doing dynamic linking, but should be straight-forward when
satic linking.
> Static/final members maybe?

Yes, those can be statically allocated. The advantage is biggest for
arrays, but even non-arrays can win if you can "inline" some of the
initialization as initialized static data.
Currently gcj does not do this, but it is planned.
	--Per Bothner
Cygnus Solutions bothner@cygnus.com http://www.cygnus.com/~bothner


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /