The Codec Engine OSAL Memory interface. Provides the user an OS-independent Memory abstraction.
Go to the source code of this file.
Data Structures | |
struct | Memory_AllocParams |
Parameters for Memory_alloc() & Memory_free(). More... | |
Defines | |
#define | Memory_DEFAULTALIGNMENT ((UInt)(-1)) |
#define | Memory_GTNAME "OM" |
#define | Memory_CACHED 0x00000000 |
#define | Memory_NONCACHED 0x00000001 |
#define | Memory_CACHEDMASK 0x00000001 |
Enumerations | |
enum | Memory_type { Memory_MALLOC = 0, Memory_SEG = 1, Memory_CONTIGPOOL = 2, Memory_CONTIGHEAP = 3 } |
Enum values for Memory_AllocParams.type. More... | |
Functions | |
Ptr | Memory_alloc (UInt size, Memory_AllocParams *params) |
General memory allocation. | |
Void | Memory_cacheInv (Ptr addr, Int sizeInBytes) |
Invalidate a range of cache. | |
Void | Memory_cacheWb (Ptr addr, Int sizeInBytes) |
Write back cache. | |
Void | Memory_cacheWbInv (Ptr addr, Int sizeInBytes) |
Write back and invalidate cache. | |
Ptr | Memory_contigAlloc (UInt size, UInt align) |
Allocate physically contiguous blocks of memory. | |
Bool | Memory_contigFree (Ptr addr, UInt size) |
Free memory allocated by Memory_contigAlloc(). | |
Bool | Memory_free (Ptr addr, UInt size, Memory_AllocParams *params) |
Free memory allocated with Memory_alloc(). | |
Void | Memory_dumpKnownContigBufsList (Void) |
Dumps the list of all translated/registered bufs. | |
UInt32 | Memory_getBufferPhysicalAddress (Ptr virtualAddress, Int sizeInBytes, Bool *isContiguous) |
Converts application virtual address to a physical address. | |
Int | Memory_getHeapId (String name) |
Get the heap heap ID corresponding to a heap name. This number will be between 0 and the value returned by Memory_getNumHeaps(). The heap Id can be passed to Memory_redefine(), Memory_restoreHeap(), and Memory_segStat(). | |
Int | Memory_getNumHeaps () |
Get the number of memory heaps. | |
Ptr | Memory_getBufferVirtualAddress (UInt32 physicalAddress, Int sizeInBytes) |
Obtains the virtual address of a physically contiguous buffer. | |
Void | Memory_registerContigBuf (UInt32 virtualAddress, UInt32 sizeInBytes, UInt32 physicalAddress) |
Register a physical buffer allocated without Memory_contigAlloc(). | |
Void | Memory_unregisterContigBuf (UInt32 virtualAddress, UInt32 sizeInBytes) |
Unregisters a physical buffer allocated without Memory_contigAlloc(). | |
Variables | |
Memory_AllocParams | Memory_DEFAULTPARAMS |
Default parameters for Memory_alloc() & Memory_free(). |