This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: gcj mingw32 and java memory footprint.
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: "Norbert Frese" <norbertf at gmx dot net>,<java at gcc dot gnu dot org>
- Date: Mon, 17 Feb 2003 20:09:22 +0100
- Subject: RE: gcj mingw32 and java memory footprint.
Perhaps the problem is not as bad as you think?
If you launch HelloSWT.exe from Mohan (5MB .exe + .dll),
the amount of physical memory it takes is 2MB according to
task manager.
Windows theory: if a dll (and an .exe is just a dll with some
conventions w.r.t. entry points, etc.) is loaded into two
seperate processes, but it is relocated to the same address,
then the memory is shared between the processes.
I.e. if your .exe is 12MB (mine is) and you launch it twice, then
the working set should be 12MB and not 24MB.
This general theory is complicated by cleverness in Windows, e.g.
does Windows know to rebase the swt-xxx.dll on the fly such
that it becomes shared without the .dll being rebased upfront?
Conclusion: the # of bytes the .exe/.dlls file takes up on disk
is far from the whole story.
Though, on the other hand: there is an esthetic problem with a
.exe file that is 12MB, but compresses to <1.5 :-)
Øyvind