Functions in this group provide non-standard methods for memory management.
◆ fastbuf_setup()
void fastbuf_setup |
( |
header ** |
freex, |
|
|
int * |
base, |
|
|
int |
size |
|
) |
| |
This function uses the word count of size
at the given pointer address base
as a fast buffer. The base
pointer must be allocated first in normal memory, e.g. by using the function call 'base
= sysmalloc(size
);', and this pointer may not be freed before there are no fastbuf routines operating anymore.
If fastbuf_setup() is not called beforehand, the functions fastbuf_malloc() and fastbuf_free() act like their normal counterparts sysmalloc() and sysfree().
Memory allocated at the fast buffer via fastbuf_malloc(), which is an independent memory manager from the normal OS memory manager must be freed by using the function fastbuf_free(), and not(!) any other free function, like sysfree() or byte_free().
- Note
- This function requires 'fast buffer' memory e.g., L1D memory within the DM6435 DSP. The proper size and pointer to this memory must be specified.
- Parameters
-
freex | the global header pointer freep. |
- Return values
-
base | Pointer to the allocated Memory. |
size | Word Count allocated. |
◆ fastbuf_free()
void fastbuf_free |
( |
void * |
ap | ) |
|
If fastbuf_setup() is not called beforehand, this function acts like sysfree().
Otherwise, it frees memory at the fast buffer, which is an independent memory manager from the normal OS memory manager. This means, if one uses the function, fastbuf_malloc(), to get an allocated pointer, one must free it by using this function, fastbuf_free(), and not(!) any other free function, like sysfree() or byte_free().
- Parameters
-
◆ fastbuf_malloc()
void* fastbuf_malloc |
( |
unsigned |
nwords | ) |
|
If fastbuf_setup() is not called beforehand, this function acts like sysmalloc().
Otherwise, it allocates memory at the fast buffer, which is an independent memory manager from the normal OS memory manager. This means, if one uses this function, fastbuf_malloc(), to get an allocated pointer, one must free it by using the function fastbuf_free(), and not(!) any other free function, like sysfree() or byte_free().
- Parameters
-
nwords | Count of Words to allocate. |
- Return values
-
Address | On Success. |
NULL | If Memory cannot be Allocated. |
◆ addrval_print()
void addrval_print |
( |
U8 * |
baseTrue, |
|
|
U8 * |
baseVirt, |
|
|
I32 |
offsBytes, |
|
|
U32 |
val, |
|
|
I8 |
writeIff1 |
|
) |
| |
Prints out Addresses and Values.
This function prints out addresses and values in various form.