fr.umlv.corosol.component
Interface JHeapAllocator

All Superinterfaces:
JObject, JVMComponent
All Known Implementing Classes:
JSimpleHeapAllocator

public interface JHeapAllocator
extends JVMComponent

A JHeapAllocator represents an allocator for the memory heap.

Author:
Christophe Deleray

Method Summary
 JArray allocateArray(JClass componentType, int length)
          Returns a new allocated array with the specified component type and length.
 JArray allocateArray(JClass componentType, int[] dimensions)
          Returns a new allocated array with the specified component type and dimensions.
 JClassInstance allocateClassInstance(JClass c)
          Returns a new allocated class instance of the specified type.
 JavaStack allocateJavaStack(int size)
          Returns a new allocated Java stack of the specified number of bytes.
 void moveAllocatables(JHeap src, JHeap dest)
           
 
Methods inherited from interface fr.umlv.corosol.component.JVMComponent
configure, getComponentClass, replace
 

Method Detail

allocateClassInstance

JClassInstance allocateClassInstance(JClass c)
Returns a new allocated class instance of the specified type.

Parameters:
c - the class to be instanciated
Returns:
a new instance of the specified class

allocateArray

JArray allocateArray(JClass componentType,
                     int length)
Returns a new allocated array with the specified component type and length.

Parameters:
componentType - the JClass object representing the component type of the new array
length - the length of the new array
Returns:
the new array

allocateArray

JArray allocateArray(JClass componentType,
                     int[] dimensions)
Returns a new allocated array with the specified component type and dimensions.

Parameters:
componentType - the JClass object representing the component type of the new array
dimensions - an array of int types representing the dimensions of the new array
Returns:
the new array

allocateJavaStack

JavaStack allocateJavaStack(int size)
Returns a new allocated Java stack of the specified number of bytes.

Parameters:
size - the size of the newly allocated Java stack in bytes

moveAllocatables

void moveAllocatables(JHeap src,
                      JHeap dest)