#include <xmog_java_lang_System.h>
Static Public Member Functions | |
| static jint | availableProcessors (xmog_localenv *env=NULL) |
| Returns the number of processors on the system. | |
| static jlong | freeMemory (xmog_localenv *env=NULL) |
| Returns the amount of free memory in the JVM. | |
| static void | gc (xmog_localenv *env=NULL) |
| Asks the Java garbage collector to run. | |
| static char * | getProperty (const char *name, xmog_localenv *env=NULL) |
Returns the value of the given property or NULL if it does not exist. | |
| static jlong | maxMemory (xmog_localenv *env=NULL) |
| Returns the maximal amount of memory that the JVM will attempt to use. | |
| static void | setProperty (const char *name, const char *value, xmog_localenv *env=NULL) |
| Sets the value of the given property. | |
| static jlong | totalMemory (xmog_localenv *env=NULL) |
| Returns the total amount of memory in the JVM. | |
This class is useful when we need a convenient way to check or modify system properties at runtime, for example in a configuration hook that adds system properties immediately after the JVM has been loaded.
It is also useful when you need to query the grbage collector for stats on available heap, etc.
|
|
Returns the number of processors on the system. This function is only available in JREs since version 1.4. If called in an earlier JVM, the return value is undefined (but most likely 1).
|
|
|
Returns the amount of free memory in the JVM.
|
|
|
Asks the Java garbage collector to run.
|
|
||||||||||||
|
Returns the value of the given property or
|
|
|
Returns the maximal amount of memory that the JVM will attempt to use. This function is only available in JREs since version 1.4.
|
|
||||||||||||||||
|
Sets the value of the given property.
|
|
|
Returns the total amount of memory in the JVM.
|
1.4.1