Data Structures |
struct | ti_sdo_ce_osal_Memory_AllocParams |
| Parameters for ti_sdo_ce_osal_Memory_alloc() & ti_sdo_ce_osal_Memory_free() More...
|
Defines |
#define | ti_sdo_ce_osal_Memory_DEFAULTALIGNMENT ((UInt)(-1)) |
| Default Alignment.
|
#define | Memory_MODNAME "ti.sdo.ce.osal.Memory" |
| Name to pass to Diags_setMask() to enable logging for Memory functions. For example, Diags_setMask(Memory_MODNAME"+EX1234567"); turns on all Log statements in this module. Diags_setMask() must be called after initialization to take effect.
|
#define | ti_sdo_ce_osal_Memory_GTNAME "OM" |
| GT name containing the trace mask for this module.
|
#define | ti_sdo_ce_osal_Memory_CACHED 0x00000000 |
| Cached allocation.
|
#define | ti_sdo_ce_osal_Memory_NONCACHED 0x00000001 |
| Non-cached allocation.
|
#define | ti_sdo_ce_osal_Memory_CACHEDMASK 0x00000001 |
| Mask to isolate cache flag.
|
Typedefs |
typedef struct
ti_sdo_ce_osal_Memory_AllocParams | ti_sdo_ce_osal_Memory_AllocParams |
| Parameters for ti_sdo_ce_osal_Memory_alloc() & ti_sdo_ce_osal_Memory_free()
|
Enumerations |
enum | ti_sdo_ce_osal_Memory_type {
ti_sdo_ce_osal_Memory_MALLOC = 0,
ti_sdo_ce_osal_Memory_SEG = 1,
ti_sdo_ce_osal_Memory_CONTIGPOOL = 2,
ti_sdo_ce_osal_Memory_CONTIGHEAP = 3
} |
| Enum values for ti_sdo_ce_osal_Memory_AllocParams.type.
More...
|
Functions |
Ptr | ti_sdo_ce_osal_Memory_alloc (UInt size, ti_sdo_ce_osal_Memory_AllocParams *params) |
| General memory allocation.
|
Void | ti_sdo_ce_osal_Memory_cacheInv (Ptr addr, Int sizeInBytes) |
| Invalidate a range of cache.
|
Void | ti_sdo_ce_osal_Memory_cacheWb (Ptr addr, Int sizeInBytes) |
| Write back cache.
|
Void | ti_sdo_ce_osal_Memory_cacheWbInv (Ptr addr, Int sizeInBytes) |
| Write back and invalidate cache.
|
Void | ti_sdo_ce_osal_Memory_cacheWbInvAll () |
| Write back and invalidate the entire cache. Not supported yet on all OS's.
|
Ptr | ti_sdo_ce_osal_Memory_contigAlloc (UInt size, UInt align) |
| Allocate physically contiguous blocks of memory.
|
Bool | ti_sdo_ce_osal_Memory_contigFree (Ptr addr, UInt size) |
| Free memory allocated by ti_sdo_ce_osal_Memory_contigAlloc()
|
Bool | ti_sdo_ce_osal_Memory_free (Ptr addr, UInt size, ti_sdo_ce_osal_Memory_AllocParams *params) |
| Free memory allocated with ti_sdo_ce_osal_Memory_alloc().
|
UInt32 | ti_sdo_ce_osal_Memory_getBufferPhysicalAddress (Ptr virtualAddress, Int sizeInBytes, Bool *isContiguous) |
| Converts application virtual address to a physical address.
|
Ptr | ti_sdo_ce_osal_Memory_getBufferVirtualAddress (UInt32 physicalAddress, Int sizeInBytes) |
| Obtains the virtual address of a physically contiguous buffer.
|
Variables |
ti_sdo_ce_osal_Memory_AllocParams | ti_sdo_ce_osal_Memory_DEFAULTPARAMS |
| Default parameters for ti_sdo_ce_osal_Memory_alloc() & ti_sdo_ce_osal_Memory_free()
|
Detailed Description
This Memory module provides services to manage memory in OS independent environments.
Package Prefix
In order to avoid global namespace collisions, this module prefixes all its exports with the globally unique package name it's contained in (ti_sdo_ce_osal). As a usability feature (and to remain backward compatible with previous releases), these exports are also made available via the more traditional 'short' name - without the package name prefix.
For example, although the actual export may be named 'ti_sdo_ce_osal_Memory_alloc', it's generally usable via the shorter name 'Memory_alloc'. In the rare case where a namespace collision occurs, users can disable the definitions of the 'short' name by defining the symbol 'ti_sdo_ce_osal_Memory__nolocalnames' before including this module's header. For example:
#define ti_sdo_ce_osal_Memory__nolocalnames
#include <ti/sdo/ce/osal/Memory.h>
This follows the same approach the XDCtools takes, and further explaination is available here: http://rtsc.eclipse.org/docs-tip/Integrating_RTSC_Modules#Eliminating_Identifier_Conflicts.
Define Documentation
#define ti_sdo_ce_osal_Memory_DEFAULTALIGNMENT ((UInt)(-1)) |
#define Memory_MODNAME "ti.sdo.ce.osal.Memory" |
Name to pass to Diags_setMask() to enable logging for Memory functions. For example, Diags_setMask(Memory_MODNAME"+EX1234567"); turns on all Log statements in this module. Diags_setMask() must be called after initialization to take effect.
#define ti_sdo_ce_osal_Memory_GTNAME "OM" |
GT name containing the trace mask for this module.
#define ti_sdo_ce_osal_Memory_CACHED 0x00000000 |
#define ti_sdo_ce_osal_Memory_NONCACHED 0x00000001 |
#define ti_sdo_ce_osal_Memory_CACHEDMASK 0x00000001 |
Typedef Documentation
Enumeration Type Documentation
Enum values for ti_sdo_ce_osal_Memory_AllocParams.type.
- See also:
- ti_sdo_ce_osal_Memory_AllocParams
- Enumerator:
ti_sdo_ce_osal_Memory_MALLOC |
malloc()-based allocation
|
ti_sdo_ce_osal_Memory_SEG |
DSP/BIOS segment-based allocation
|
ti_sdo_ce_osal_Memory_CONTIGPOOL |
Contiguous, pool-based allocation
|
ti_sdo_ce_osal_Memory_CONTIGHEAP |
Contiguous, heap-based allocation
|
Function Documentation
Void ti_sdo_ce_osal_Memory_cacheInv |
( |
Ptr |
addr, |
|
|
Int |
sizeInBytes |
|
) |
| |
Void ti_sdo_ce_osal_Memory_cacheWb |
( |
Ptr |
addr, |
|
|
Int |
sizeInBytes |
|
) |
| |
Void ti_sdo_ce_osal_Memory_cacheWbInv |
( |
Ptr |
addr, |
|
|
Int |
sizeInBytes |
|
) |
| |
Void ti_sdo_ce_osal_Memory_cacheWbInvAll |
( |
) |
|
Ptr ti_sdo_ce_osal_Memory_contigAlloc |
( |
UInt |
size, |
|
|
UInt |
align |
|
) |
| |
Bool ti_sdo_ce_osal_Memory_contigFree |
( |
Ptr |
addr, |
|
|
UInt |
size |
|
) |
| |
UInt32 ti_sdo_ce_osal_Memory_getBufferPhysicalAddress |
( |
Ptr |
virtualAddress, |
|
|
Int |
sizeInBytes, |
|
|
Bool * |
isContiguous |
|
) |
| |
Converts application virtual address to a physical address.
This API also checks verifies that the buffer is really contiguous.
- Parameters:
-
[in] | virtualAddress | Address of a buffer. |
[in] | sizeInBytes | Size of the buffer. |
[out] | isContiguous | Optional flag indicating whether the buffer was physically contiguous or not. |
- Return values:
-
0 | Failure, the physical address could not be obtained. |
non-zero | The physical address of the buffer. |
- See also:
- ti_sdo_ce_osal_Memory_getBufferVirtualAddress()
Ptr ti_sdo_ce_osal_Memory_getBufferVirtualAddress |
( |
UInt32 |
physicalAddress, |
|
|
Int |
sizeInBytes |
|
) |
| |
Obtains the virtual address of a physically contiguous buffer.
- Parameters:
-
[in] | physicalAddress | Physical address of a buffer. |
[in] | sizeInBytes | Size of the buffer. |
- Return values:
-
NULL | Failure, the virtual address could not be obtained. |
non-zero | The virtual address of the buffer. |
- See also:
- ti_sdo_ce_osal_Memory_getBufferPhysicalAddress()
Variable Documentation