>> so, if I cal gc frequently enough to make my memory garbage small, I
>> would teoreticly solve the problem?
[quoted text clipped - 5 lines]
> Generally, they don't.
> Try adding more memory.
That sounds like Microsoft
Customer> I have problems with the performance of your application, please
help.
Misrosoft > Buy stronger machine
I have 768 mb RAM, isn't that enough
Antti S. Brax - 14 Jan 2004 09:13 GMT
buzz@vip.hr wrote in comp.lang.java.gui:
>>> so, if I cal gc frequently enough to make my memory garbage small, I
>>> would teoreticly solve the problem?
[quoted text clipped - 7 lines]
>
> That sounds like Microsoft
No matter how tiny amount of memory your Java program uses
it will get swapped to disk when unused if other programs
require more memory than what you have. There is nothing
Microsoft or anyone else can do to prevent it.
But then I also have the impression that Microsoft's operating
systems swap programs to disk when they have been unused even
if there is no need for swapping. Maybe they want to free the
memory so that the next program you need gets started quicker?
Don't know for sure and don't care. Linux fills my needs better.

Signature
Antti S. Brax - asb(at)iki.fi Rullalautailu pitää lapset poissa ladulta
http://www.iki.fi/asb/ http://www.cs.helsinki.fi/u/abrax/hlb/
Steven T Abell - 14 Jan 2004 16:36 GMT
>>>so, if I cal gc frequently enough to make my memory garbage small, I
>>>would teoreticly solve the problem?
[quoted text clipped - 7 lines]
>
> That sounds like Microsoft
I'm sure it does, but invoking gc will still not solve your problem.
> I have 768 mb RAM, isn't that enough
I have a lot less than that.
Steve W. Jackson - 14 Jan 2004 17:23 GMT
>:>>>so, if I cal gc frequently enough to make my memory garbage small, I
>:>>>would teoreticly solve the problem?
[quoted text clipped - 13 lines]
>:
>:I have a lot less than that.
And all the memory in the universe won't solve your problem (if it's
memory related at all) unless your JVM has been given enough. Java's
memory model isn't like other environments -- its heap has a min and max
size indepent of the underlying OS.
= Steve =

Signature
Steve W. Jackson
Montgomery, Alabama
Igor Buzatovic - 15 Jan 2004 08:42 GMT
>>>>>> so, if I cal gc frequently enough to make my memory garbage
>>>>>> small, I would teoreticly solve the problem?
[quoted text clipped - 18 lines]
> memory model isn't like other environments -- its heap has a min and
> max size indepent of the underlying OS.
Yes, I know. That's why I thought that calling Runtime.gc() periodically
would keep memory heap low so when I maximize my frame even is gc() is
called at that time garbage collecting will not take long time.
Andrew Thompson - 15 Jan 2004 13:20 GMT
| ..That's why I thought that calling Runtime.gc() periodically
| would keep memory heap low so when I maximize my frame even is gc() is
| called at that time garbage collecting will not take long time.
The best way to ensure that memory can
be gc'd is to ensure that there are no references
remaining to objects you have finished using.
LargeObject lo = new LargeObject();
//.... do stuff
lo = null;
HTH
--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site