This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: bug in ZipInputStream
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Erik Poupaert <erik dot poupaert at chello dot be>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 13 Dec 2002 13:14:40 -0500 (EST)
- Subject: Re: bug in ZipInputStream
On Fri, 13 Dec 2002, 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