JNative project : see http://jnative.sf.net


org.xvolks.jnative.pointers.memory
Class HeapMemoryBlock

java.lang.Object
  extended by org.xvolks.jnative.pointers.memory.AbstractMemoryBlock
      extended by org.xvolks.jnative.pointers.memory.HeapMemoryBlock
All Implemented Interfaces:
MemoryBlock

public class HeapMemoryBlock
extends AbstractMemoryBlock


Constructor Summary
HeapMemoryBlock(int size)
           
 
Method Summary
 void dispose()
          Method dispose provides a way to free the memory
 int reserveMemory(int size)
          Method reserveMemory allocate a block of native memory
 
Methods inherited from class org.xvolks.jnative.pointers.memory.AbstractMemoryBlock
getPointer, getSize, setPointer, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeapMemoryBlock

public HeapMemoryBlock(int size)
                throws NativeException
Throws:
NativeException
Method Detail

reserveMemory

public int reserveMemory(int size)
                  throws NativeException
Method reserveMemory allocate a block of native memory

Parameters:
size - in bytes of the block
Returns:
the address of the reserved memory
Throws:
NativeException

dispose

public void dispose()
             throws NativeException
Method dispose provides a way to free the memory

Throws:
NativeException

JNative project : see http://jnative.sf.net