[clug] Why isn't Java popular on the Linux Desktop? [SEC=PERSONAL]

Martijn van Oosterhout kleptog at svana.org
Mon Jul 13 02:56:23 MDT 2009


On Sun, Jul 12, 2009 at 09:25:37PM +1000, Sam Couter wrote:
> Martijn van Oosterhout <kleptog at svana.org> wrote:
> > The whole memory management methodolgy of Java seems terrible for me.
> > On startup it allocates some fixed amount of memory. And when you run
> > out you're stuck. I've never understood why the memory usage couldn't
> > be more dynamic, allocating more as needed and freeing to the OS when
> > it wasn't...
> 
> It allocates memory as it needs it, up to a pre-determined limit. Once
> it approaches that limit it starts reclaiming used memory (garbage
> collection). GC comes at a cost, and without that memory pressure, the
> VM doesn't know how hard to push the GC.

But it makes it useless for interactive programs, since you have to
determine at startup how much memory you think you'll need during the
entire duration of the program. I understand the pressure argument, but
surely if the GC sees that 90% of allocated memory is really in use, it
could think to just allocate more from the OS...

Put it another way: I can't think of another programming language that
requires you to specify at program startup how much memory you want to
use.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog at svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20090713/7415e626/attachment.bin


More information about the linux mailing list