Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Memory.Heap
Class ImmortalHeap  view ImmortalHeap download ImmortalHeap.java

java.lang.Object
  extended byMemory.Heap.Heap
      extended byMemory.Heap.ImmortalHeap

public class ImmortalHeap
extends Heap

Version:
$Id: ImmortalHeap.java,v 1.5 2003/05/12 10:05:19 joewhaley Exp $

Field Summary
private  Memory.HeapAddress allocationCursor
           
private  int markValue
           
 
Fields inherited from class Memory.Heap.Heap
allHeaps, end, name, start, verbose
 
Constructor Summary
ImmortalHeap()
          Initialize for boot image - called from init of various collectors or spaces
 
Method Summary
 java.lang.Object allocateAlignedArray(Clazz.jq_Array type, int numElements, int alignment)
          Allocate an array object whose pointer is N bit aligned.
private  Memory.HeapAddress allocateInternal(int size, int alignment, int offset)
           
protected  Memory.HeapAddress allocateZeroedMemory(int size)
          Allocate a chunk of memory of a given size.
protected  Memory.HeapAddress allocateZeroedMemory(int size, int alignment)
          Allocate a chunk of memory of a given size.
protected  Memory.HeapAddress allocateZeroedMemory(int size, int alignment, int offset)
          Allocate a chunk of memory of a given size.
 int freeMemory()
          Get the total amount of memory available in immortal space.
 void init(int size)
           
 boolean isLive(Memory.HeapAddress ref)
          Is the object reference live?
 boolean mark(Memory.HeapAddress ref)
          Mark an object in the boot heap
protected  void postAllocationProcessing(java.lang.Object newObj)
          Hook to allow heap to perform post-allocation processing of the object.
 void startCollect()
          Work to do before collection starts.
 int totalMemory()
          Get total amount of memory used by immortal space.
 
Methods inherited from class Memory.Heap.Heap
addrInAnyHeap, addrInHeap, allocateArray, allocateArray, allocateObject, allocateObject, boot, clobber, clobber, getSize, paranoidScan, refInAnyHeap, refInHeap, setRegion, show, show, showAllHeaps, showRange, touchPages, zero
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allocationCursor

private Memory.HeapAddress allocationCursor

markValue

private int markValue
Constructor Detail

ImmortalHeap

public ImmortalHeap()
Initialize for boot image - called from init of various collectors or spaces

Method Detail

init

public void init(int size)

totalMemory

public int totalMemory()
Get total amount of memory used by immortal space.


freeMemory

public int freeMemory()
Get the total amount of memory available in immortal space.


mark

public boolean mark(Memory.HeapAddress ref)
Mark an object in the boot heap


isLive

public boolean isLive(Memory.HeapAddress ref)
Is the object reference live?


startCollect

public void startCollect()
Work to do before collection starts.


allocateAlignedArray

public java.lang.Object allocateAlignedArray(Clazz.jq_Array type,
                                             int numElements,
                                             int alignment)
Allocate an array object whose pointer is N bit aligned.


allocateZeroedMemory

protected Memory.HeapAddress allocateZeroedMemory(int size)
Allocate a chunk of memory of a given size.

Specified by:
allocateZeroedMemory in class Heap

allocateZeroedMemory

protected Memory.HeapAddress allocateZeroedMemory(int size,
                                                  int alignment)
Allocate a chunk of memory of a given size.


allocateZeroedMemory

protected Memory.HeapAddress allocateZeroedMemory(int size,
                                                  int alignment,
                                                  int offset)
Allocate a chunk of memory of a given size.


allocateInternal

private Memory.HeapAddress allocateInternal(int size,
                                            int alignment,
                                            int offset)

postAllocationProcessing

protected void postAllocationProcessing(java.lang.Object newObj)
Hook to allow heap to perform post-allocation processing of the object. For example, setting the GC state bits in the object header.

Specified by:
postAllocationProcessing in class Heap