All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.bulletproof.util.Runtime1

java.lang.Object
   |
   +----com.bulletproof.util.Runtime1

public final class Runtime1
extends Object
This class includes methods for interfacing with the KJava runtime environment.

This class cannot be instantiated.


Method Index

 o freeMemory()
Returns the amount of free memory in the system.
 o gc()
Runs the garbage collector.

Methods

 o freeMemory
 public static native int freeMemory()
Returns the amount of free memory in the system. The value returned by this method is always less than the value returned by the totalMemory method. Calling the gc method may result in increasing the value returned by freeMemory.

Returns:
an approximation to the total amount of memory currently available for future allocated objects, measured in bytes.
 o gc
 public static native void gc()
Runs the garbage collector. Calling this method suggests that the KJava virtual machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the KJava virtual machine has made its best effort to recycle all unused objects.

The name gc stands for "garbage collector". The KJava virtual machine performs this recycling process automatically as needed even if the gc method is not invoked explicitly.


All Packages  Class Hierarchy  This Package  Previous  Next  Index