Mike Gerdts wrote: > On 4/18/07, Shawn Walker <binarycrusader at gmail.com> wrote: >> It depends on how the program is written. Just because it's java does >> not mean it automatically takes a lot of memory. A lot of factors come >> into play when determining the target memory requirements even when >> the program is written in java. > > Part of the equation in the installer footprint is the fact that the > miniroot is commonly loaded into a ramdisk. If the JRE alone (before > it even starts running) takes up ~100 MB (based upon /usr/j2se on S9), > this can be considered rather heavy. Perhaps the installer version of > java can be trimmed a bit. >
The Java team is probably not all that interested in trying to carve up Java SE for just our purposes; I'm not sure it even meets the definition of Java SE anymore if you were to do that. > At the risk of straying from the topic at hand (and showing that I've > done very little with Java), how is it that cell phones can be > "powered by java" and end users don't complain about the memory > footprint but even trivial java apps seem to consume tons of RAM? For > example, hello world + read a character has a RSS as follows for Java > and C. > > $ ps -o rss,args -p 13278\ 13427 > RSS COMMAND > 728 ./hello > 11440 java myfirstjavaprog > > I assume that this is due to the use of Java ME rather than Java SE. > Is there any reason that Java ME wouldn't be right for an installer? > Or would it not offer much of a benefit? > Java ME's basic profiles don't include Swing, which was the primary reason the GUI uses Java. There are profiles for J2ME which include Swing, but they appear to have some limitations, too (basically, you better limit yourself to a cellphone-appropriate GUI), that might make it not functional enough. And then we'd have to get someone in Java-land to supply that J2ME profile for Solaris. Not impossible, but it would be hard to get funded. > Perhaps more importantly, if a ramdisk is used is the kernel smart > enough to not allocate pages to buffer pages that are mapped from the > ramdisk? > That I don't know the answer to, though it would be surprising to me if it weren't. Dave
