SunSPOT API V3.0


com.sun.spot.dmamemory.proxy
Class ProxyDMAMemoryManager

java.lang.Object
  extended by com.sun.spot.dmamemory.proxy.ProxyDMAMemoryManager
All Implemented Interfaces:
IDMAMemoryManager

public class ProxyDMAMemoryManager
extends Object
implements IDMAMemoryManager

Acts as a proxy for DMAMemoryManager in child isolates


Field Summary
static String DMA_MEMORY_SERVER
           
 
Constructor Summary
ProxyDMAMemoryManager()
          For use by the SPOT library only - to get a handle to a DMA Memory Manager use Spot.getInstance().getDMAMemoryManager()
 
Method Summary
 Hashtable getAllocationDetails()
          Get information about current memory allocations.
 int getBuffer(int size, String comment)
          Try to obtain memory for a DMA buffer.
 int getMaxAvailableBufferSize()
          Find out the size of the biggest available DMA memory buffer
 void releaseBuffer(int memAddr)
          Release a previously allocated buffer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DMA_MEMORY_SERVER

public static final String DMA_MEMORY_SERVER
See Also:
Constant Field Values
Constructor Detail

ProxyDMAMemoryManager

public ProxyDMAMemoryManager()
For use by the SPOT library only - to get a handle to a DMA Memory Manager use Spot.getInstance().getDMAMemoryManager()

Method Detail

getAllocationDetails

public Hashtable getAllocationDetails()
Description copied from interface: IDMAMemoryManager
Get information about current memory allocations. Each entry in the table represents an allocation. The key is the comment string provided when the buffer was allocated; the value is the size of the buffer.

Specified by:
getAllocationDetails in interface IDMAMemoryManager
Returns:
The table of allocations

getBuffer

public int getBuffer(int size,
                     String comment)
              throws NotEnoughDMAMemoryException
Description copied from interface: IDMAMemoryManager
Try to obtain memory for a DMA buffer.

Specified by:
getBuffer in interface IDMAMemoryManager
Parameters:
size - The size of the required buffer
comment - A string that describes the usage (so we can tell who's using what)
Returns:
The address of the allocated buffer
Throws:
NotEnoughDMAMemoryException

getMaxAvailableBufferSize

public int getMaxAvailableBufferSize()
Description copied from interface: IDMAMemoryManager
Find out the size of the biggest available DMA memory buffer

Specified by:
getMaxAvailableBufferSize in interface IDMAMemoryManager
Returns:
The size of the biggest buffer that is available

releaseBuffer

public void releaseBuffer(int memAddr)
Description copied from interface: IDMAMemoryManager
Release a previously allocated buffer

Specified by:
releaseBuffer in interface IDMAMemoryManager
Parameters:
memAddr - The address of the buffer being released

SunSPOT API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.