|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.system.Memory
public final class Memory
Virtual machine memory-management utilities.
Some of the utility methods in this class return a MemoryStats
object. You can then use the various methods provided by that object to get
detailed information about the device's available storage.
| Method Summary | ||
|---|---|---|
static MemoryStats |
getCodeStats()
Returns a statistics object for code modules. |
|
static int |
getFlashFree()
Returns the amount of free flash. |
|
static MemoryStats |
getFlashStats()
Returns a statistics object for flash memory. |
|
static int |
getFlashTotal()
Returns the amount of flash needed. |
|
static int |
getMemoryNeeded()
Returns the amount of flash the VM wants to recover. |
|
static MemoryStats |
getObjectStats()
Returns a statistics object for object handles. |
|
static MemoryStats |
getPersistentStats()
Returns a statistics object for persistent objects in flash. |
|
static MemoryStats |
getRAMStats()
Returns a statistics object for RAM. |
|
static MemoryStats |
getTransientStats()
Returns a statistics object for transient objects in flash. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MemoryStats getRAMStats()
The following table describes the information retrievable from the
returned MemoryStats object.
| Method invoked... | Information retrieved... |
|---|---|
MemoryStats.getAllocated()
| Total amount of RAM allocated by the VM. |
MemoryStats.getFree()
| Amount of free RAM available in the system. |
MemoryStats.getObjectCount()
| Number of Java objects residing in RAM. |
MemoryStats.getObjectSize()
| Total size of all Java objects residing in RAM. |
public static MemoryStats getFlashStats()
The following table describes the information retrievable from the returned MemoryStats object.
| Method invoked... | Information retrieved... |
|---|---|
MemoryStats.getAllocated()
| Total amount of flash allocated by the VM. |
MemoryStats.getFree()
| Amount of free flash available in the system. |
MemoryStats.getObjectCount()
| Number of Java objects residing in flash. |
MemoryStats.getObjectSize()
| Total size of all Java objects residing in flash. |
public static MemoryStats getTransientStats()
The following table describes the information retrievable from the returned MemoryStats object.
| Method invoked... | Information retrieved... |
|---|---|
MemoryStats.getAllocated()
| Total amount of flash allocated by the VM for transient objects. |
MemoryStats.getFree()
| Amount of free flash available in the system. |
MemoryStats.getObjectCount()
| Number of transient Java objects residing in flash. |
MemoryStats.getObjectSize()
| Total size of all transient Java objects residing in flash. Note: This method is not supported in a demand-paged environment. This only occurs in NAND flash devices. The method will return 0 if invoked in such a case. |
public static MemoryStats getPersistentStats()
The following table describes the information retrievable from the returned MemoryStats object.
| Method invoked... | Information retrieved... |
|---|---|
MemoryStats.getAllocated()
| Total amount of flash allocated by the VM for persistent objects. Note: This method is not supported in a demand-paged environment. This only occurs in NAND flash devices. The method will return 0 if invoked in such a case. |
MemoryStats.getFree()
| Amount of free flash available in the system. |
MemoryStats.getObjectCount()
| Number of persistent Java objects residing in flash. |
MemoryStats.getObjectSize()
| Total size of all persistent Java objects residing in flash. Note: This method is not supported in a demand-paged environment. This only occurs in NAND flash devices. The method will return 0 if invoked in such a case. |
public static MemoryStats getObjectStats()
The following table describes the information retrievable from the returned MemoryStats object.
| Method invoked... | Information retrieved... |
|---|---|
MemoryStats.getAllocated()
| Total number of Java objects. |
MemoryStats.getFree()
| Number of Java objects which can still be instantiated. |
MemoryStats.getObjectCount()
| Maximum number of Java objects which the VM can instantiate. |
MemoryStats.getObjectSize()
| Total size of all Java objects. Note: This method is not supported in a demand-paged environment. This only occurs in NAND flash devices. The method will return 0 if invoked in such a case. |
public static MemoryStats getCodeStats()
The following table describes the information retrievable from the returned MemoryStats object.
| Method invoked... | Information retrieved... |
|---|---|
MemoryStats.getAllocated()
| Total amount of flash allocated for code modules and related structures (for example, vtables). |
MemoryStats.getFree()
| Amount of free flash available in the system. |
MemoryStats.getObjectCount()
| Number of java objects which point directly to memory in a code module (for example, constant String). |
MemoryStats.getObjectSize()
| Cannot be calculated; always returns 0. |
public static int getMemoryNeeded()
public static int getFlashFree()
public static int getFlashTotal()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal