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


org.xvolks.jnative.pointers.memory
Class NativeMemoryBlock

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

public class NativeMemoryBlock
extends AbstractMemoryBlock


Constructor Summary
NativeMemoryBlock(int address, int size)
           
 
Method Summary
 void dispose()
          Method dispose provides a way to free the memory This implementation does nothing as we do not know how this memory block was allocated
 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

NativeMemoryBlock

public NativeMemoryBlock(int address,
                         int size)
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

This implementation does nothing as we do not know how this memory block was allocated

Throws:
NativeException

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