On 25 Jul 2003 19:52:58 -0700,
(iksrazal) wrote
or quoted :
>128m solves the problem. Less of course the the
>time profiling, etc.
>
>Why is this neccesary?
It takes considerable RAM to process and store a fat RMI object. You
have already filled RAM with various classes and variables. It simply
won't fit in the default allocation, even after garbage collection.
Fat objects are doubly difficult. They cannot exploit fragmented RAM.
Perhaps your question is, why does not the heap just grow dynamically
as needed until the VM fills the entire hard disk?
Chances are if it does, the application has gone mad. You don't want
programs that have no business exploding like that taking over your
machine.
So, if you want to permit that behaviour, you must explicitly allow it
on the command line.
My other thought is, if you are sending giant amounts of data like
that, perhaps you would be better off to send them via GZIPed socket
so they never have to exist entirely in RAM at either end.
see
http:///mindprod.com/fileio.html for sample code how to do that.
Leave everything RMI, just do a special socket for this bulk transfer.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See
http://mindprod.com/jgloss/jgloss.html for The Java Glossary.