[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ProgSoc] Java threads



You can use the freeMemory() method or totalMemory() method to
determine/calculate how much memory is available or in use.
Another way of avoiding crashes is to call the garbage collector gc() even
though java does it automatically, it is specific to the JVM implementation
and is only run when the system is idle or not too busy. Therefore you could
explicitly tell the JVM to compact unused memory freeing up resources
quicker. These methods can be found java.lang.Runtime


Hd
--
Han-Dat Luc
Senior Software Developer
National Electronic Interchange Services (ACN 003 090 506)
Email: Han-Dat.Luc@nospam.neis.com.au
Phone: +61 2 9968 5758

Is your operating system Y2K compliant? Use Win95 or Win98 !!! The name says
it all.
-----Original Message-----
From: Reardon, Benjamin <benjamin.reardon@nospam.eds.com>
To: 'Progsoc' <progsoc@nospam.progsoc.uts.edu.au>
Date: Monday, 8 February 1999 18:16
Subject: [ProgSoc] Java threads


>On a Java note, I have a function that calls multiple threads. The problem
>is that there could easily be 5000+ threads in use at any one time. What
>methods are available to tell when there are sufficent system resources to
>permit an extra thread, or to put it another way, how do I know when the
>system is incapable of supporting another thread (apart from the
>program/system falling over)?
>
>Ben Reardon
>mailto:benjamin.reardon@nospam.eds.com
>
>
>--
>You are subscribed to the progsoc mailing list. To unsubscribe, send a
>message containing "unsubscribe" to progsoc-request@nospam.progsoc.uts.edu.au.
>If you are having trouble, ask owner-progsoc@nospam.progsoc.uts.edu.au for help.
>
>This list is archived at <http://www.progsoc.uts.edu.au/lists/progsoc/>

--
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@nospam.progsoc.uts.edu.au.
If you are having trouble, ask owner-progsoc@nospam.progsoc.uts.edu.au for help.

This list is archived at <http://www.progsoc.uts.edu.au/lists/progsoc/>