bug in ZipInputStream
Jeff Sturm
jsturm@one-point.com
Fri Dec 13 10:14:00 GMT 2002
On 2002年12月13日, Erik Poupaert wrote:
> And last, probably another annoying question: what compilation options can I
> use to maximally reduce the executable's size? HelloWorld amounts to a
> whopping 4 Mb.
Stripped? You should be seeing 1-2MB, depending on target and options.
> With gcc, I get away with 50 Kb. The only justification gcj
> has for larger sizes, is the automatic linkage of a garbage collection
> library.
That's incorrect.
I assuming you mean a program to do "System.out.println(...)" of
something. This requires loading/initializing System, Runtime,
Properties, plus much of java.util and java.io. All of these classes will
be statically linked by gcj.
> You're not going to tell me that the garbage collector weighs in at
> 4 Mb? For Christ's sake, which redundant space shuttle logic is shoved
> automatically in every executable to beef it up to 4 Mb? I'm baffled.
Try "java -verbose:class HelloWorld" for comparison. I get something like
240 class loaded and 74 initialized with JDK 1.3.1.
You can blame Sun for this design. It's not gcj's fault.
Jeff
More information about the Java
mailing list