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


org.xvolks.jnative.pointers.memory
Class GlobalMemoryBlock

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

public class GlobalMemoryBlock
extends AbstractMemoryBlock


Field Summary
static int GHND
           
static int GMEM_FIXED
           
static int GMEM_MOVEABLE
           
static int GMEM_ZEROINIT
           
static int GPTR
           
 
Constructor Summary
GlobalMemoryBlock(int size)
           
GlobalMemoryBlock(int size, int type)
           
 
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
 

Field Detail

GMEM_FIXED

public static final int GMEM_FIXED
See Also:
Constant Field Values

GMEM_ZEROINIT

public static final int GMEM_ZEROINIT
See Also:
Constant Field Values

GPTR

public static final int GPTR
See Also:
Constant Field Values

GMEM_MOVEABLE

public static final int GMEM_MOVEABLE
See Also:
Constant Field Values

GHND

public static final int GHND
See Also:
Constant Field Values
Constructor Detail

GlobalMemoryBlock

public GlobalMemoryBlock(int size)
                  throws NativeException
Throws:
NativeException

GlobalMemoryBlock

public GlobalMemoryBlock(int size,
                         int type)
                  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:
a MemoryBlock representing 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