Heap memory management routines.
More...
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <techtype.h>
#include <dbgfuncs.h>
#include "stbheap.h"
#include "stbhwmem.h"
Go to the source code of this file.
|
#define | _STBHEAP_C |
|
#define | STB_HEAP_PRINT(x) |
|
|
void | STB_HeapInitialise (void) |
|
void * | STB_GetMemory (U32BIT bytes) |
| Attempts to allocate memory from the heap. More...
|
|
void | STB_FreeMemory (void *addr) |
| Releases previously allocated heap memory. More...
|
|
void * | STB_ResizeMemory (void *ptr, U32BIT new_num_bytes) |
| Re-allocates a given memory area to the new size, ensuring data contained within the original memory block is maintained. More...
|
|
void * | STB_AppGetMemory (U32BIT bytes) |
| Attempts to allocate memory from the application heap. More...
|
|
void | STB_AppFreeMemory (void *addr) |
| Releases previously allocated application heap memory. More...
|
|
void * | STB_AppResizeMemory (void *ptr, U32BIT new_num_bytes) |
| Re-allocates a given memory area to the new size, ensuring data contained within the original memory block is maintained. More...
|
|
void | STB_AppRegisterCacheFreeFunction (BOOLEAN(*callback_function)(void)) |
|
Heap memory management routines.
- Date
- 06/09/2000
Definition in file stbheap.c.
◆ STB_AppFreeMemory()
void STB_AppFreeMemory |
( |
void * |
addr | ) |
|
Releases previously allocated application heap memory.
- Parameters
-
addr | - pointer to block to release. |
Definition at line 781 of file stbheap.c.
◆ STB_AppGetMemory()
void* STB_AppGetMemory |
( |
U32BIT |
bytes | ) |
|
Attempts to allocate memory from the application heap.
- Parameters
-
bytes | - block size required in bytes |
- Returns
- Pointer to block allocated or NULL on failure.
Definition at line 651 of file stbheap.c.
◆ STB_AppResizeMemory()
void* STB_AppResizeMemory |
( |
void * |
ptr, |
|
|
U32BIT |
new_num_bytes |
|
) |
| |
Re-allocates a given memory area to the new size, ensuring data contained within the original memory block is maintained.
- Parameters
-
ptr | - pointer to block to re-allocate. |
new_num_bytes | - size of new memory block |
- Returns
- Pointer to the new (re-sized) memory block.
Definition at line 891 of file stbheap.c.
◆ STB_FreeMemory()
void STB_FreeMemory |
( |
void * |
addr | ) |
|
Releases previously allocated heap memory.
- Parameters
-
addr | - pointer to block to release. |
Definition at line 336 of file stbheap.c.
◆ STB_GetMemory()
void* STB_GetMemory |
( |
U32BIT |
bytes | ) |
|
Attempts to allocate memory from the heap.
- Parameters
-
bytes | - block size required in bytes |
- Returns
- Pointer to block allocated or NULL on failure.
Definition at line 221 of file stbheap.c.
◆ STB_ResizeMemory()
void* STB_ResizeMemory |
( |
void * |
ptr, |
|
|
U32BIT |
new_num_bytes |
|
) |
| |
Re-allocates a given memory area to the new size, ensuring data contained within the original memory block is maintained.
- Parameters
-
ptr | - pointer to block to re-allocate. |
new_num_bytes | - size of new memory block |
- Returns
- Pointer to the new (re-sized) memory block.
Definition at line 550 of file stbheap.c.