Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
MemoryAdvice
interface defines the values returned by
the getMemoryAdvice
and waitForMemoryAdvice
methods of the Runtime
class. These methods allow a
program to query the runtime system for advice about how it should
manage its memory usage. There are four increasingly-dire levels of
advice.
Field Summary | |
static int | GREEN
GREEN tells the program that
no special actions are suggested.
|
static int | ORANGE
ORANGE tells the program that
it should try to discard objects as soon as possible in order to
maintain good performance.
|
static int | RED
RED tells the program that it
should take every conceivable action to discard objects.
|
static int | YELLOW
YELLOW tells the program that
it would be beneficial, but not essential, to discard some objects
in the near future.
|
Field Detail |
public static final int GREEN
GREEN
tells the program that
no special actions are suggested.public static final int YELLOW
YELLOW
tells the program that
it would be beneficial, but not essential, to discard some objects
in the near future. On a system with virtual memory, this level
typically implies that the virtual machine will soon request
additional memory resources. If the maximum size of the heap is set
when the virtual machine starts, this level typically implies that a
preset low-memory threshold has been reached. Note that these two
conditions are not mutually exclusive.public static final int ORANGE
ORANGE
tells the program that
it should try to discard objects as soon as possible in order to
maintain good performance. On a system with virtual memory, this
level typically implies that paging is imminent. If the maximum
size of the heap is set when the virtual machine starts, this level
typically implies that a preset very-low-memory threshold has been
reached. Note that these two conditions are not mutually exclusive.public static final int RED
RED
tells the program that it
should take every conceivable action to discard objects. This level
typically means that very little memory is left. Any cleanup
actions should, therefore, allocate as few objects as possible.Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |