SunSPOT API V3.0


com.sun.spot.dmamemory
Interface IDMAMemoryManager

All Known Implementing Classes:
DMAMemoryManager, ProxyDMAMemoryManager

public interface IDMAMemoryManager

Interface to a manager of uncached memory suitable for use as DMA buffers.


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
 

Method Detail

getBuffer

int getBuffer(int size,
              String comment)
              throws NotEnoughDMAMemoryException
Try to obtain memory for a DMA buffer.

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

int getMaxAvailableBufferSize()
Find out the size of the biggest available DMA memory buffer

Returns:
The size of the biggest buffer that is available

releaseBuffer

void releaseBuffer(int memAddr)
Release a previously allocated buffer

Parameters:
memAddr - The address of the buffer being released

getAllocationDetails

Hashtable getAllocationDetails()
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.

Returns:
The table of allocations

SunSPOT API V3.0


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