gcj mingw32 and java memory footprint.
Mon Feb 17 19:14:00 GMT 2003
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
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 :-)
More information about the Java