serverside programs
Jeff Sturm
jsturm@one-point.com
Thu Sep 18 00:13:00 GMT 2003
On Wed, 17 Sep 2003, Erik Poupaert wrote:
> So, the fact that garbage collection is active, does not mean that the
> code could not be full of memory leaks.
Definitely.
> A java serverside program can
> bring down your machine (or
> else its own process), no sweat; and given the starting footprint (tens of megabytes)
> and the speed at which numerous heap-based objects tend to get created, way much
> easier than native programs.
I don't see how the last claim follows. I've witnessed much buggy C/C++
code eat heap at alarming rates too; I disbelieve Java has any inherent
characteristic that puts it at a disadvantage there. Buggy code is buggy
code. And at least you're avoiding the worst problems: buffer overflow
exploits, freeing blocks prematurely, etc.
> I've replaced the java emailserver with (native) qmail; and memory consumption hasn't
> budged since. In my opinion, gcj needs options to reduce starting footprint
> drastically, and then an option that introduces more predictable memory
> de-allocation. Otherwise how can we recommend writing serverside applications like
> qmail in Java to other people?
You can always the GC_MAXIMUM_HEAP_SIZE environment variable with libgcj
to prevent a rogue program from consuming all system resources.
Jeff
More information about the Java
mailing list