|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.squawk.GC
public class GC
| Constructor Summary | |
|---|---|
GC()
|
|
| Method Summary | |
|---|---|
static void |
arraycopy(Object src,
int srcPos,
Object dst,
int dstPos,
int lth)
Copy data from one array to another. |
static int |
calculateOopMapSizeInBytes(int size)
Calculates the size (in bytes) of an oop map that will have a bit for every word in a memory of a given size. |
static long |
freeMemory()
Returns the amount of free memory in the system. |
static int |
getArrayLength(Object array)
Get the length of an array. |
static int |
getHashCode(Object object)
Get the hashcode for an object. |
static Klass |
getKlass(Object object)
Get the class of an object. |
static boolean |
inRam(Object object)
Determines if a given object is in RAM. |
static String |
makeEightBitString(Object oop)
Change the type of the given object to com.sun.squawk.StringOfBytes. |
static String |
makeSixteenBitString(Object oop)
Change the type of the given object to java.lang.String. |
static int |
roundUpToWord(int value)
Rounds up a 32 bit value to the next word boundry. |
static void |
stringcopy(Object src,
int srcPos,
Object dst,
int dstPos,
int lth)
Copy data from one string to another. |
static long |
totalMemory()
Returns the total amount of RAM memory in the Squawk Virtual Machine. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GC()
| Method Detail |
|---|
public static int roundUpToWord(int value)
value - the value to round up
public static boolean inRam(Object object)
object - the object to test
object is an instance in RAMpublic static int calculateOopMapSizeInBytes(int size)
size - the size (in bytes) of the memory that the oop map will describe
size bytespublic static Klass getKlass(Object object)
object - the object
public static int getArrayLength(Object array)
throws com.sun.squawk.pragma.ForceInlinedPragma
array - the array
com.sun.squawk.pragma.ForceInlinedPragma
public static void arraycopy(Object src,
int srcPos,
Object dst,
int dstPos,
int lth)
src - the source arraysrcPos - the start position in the source arraydst - the destination arraydstPos - the start position in the destination arraylth - number of elements to copy
public static void stringcopy(Object src,
int srcPos,
Object dst,
int dstPos,
int lth)
src - the source stringsrcPos - the start position in the source stringdst - the destination stringdstPos - the start position in the destination stringlth - number of characters to copypublic static String makeEightBitString(Object oop)
oop - the object
public static String makeSixteenBitString(Object oop)
oop - the object
public static int getHashCode(Object object)
object - the object the hashcode is needed for.
public static long freeMemory()
gc
method may result in increasing the value returned by freeMemory.
public static long totalMemory()
Note that the amount of memory required to hold an object of any given type may be implementation-dependent.
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||