LibJuno 0.42.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
|
#include "juno/memory/memory_block.h"
#include "juno/macros.h"
#include "juno/status.h"
#include "juno/memory/memory_api.h"
#include <stddef.h>
#include <stdint.h>
Functions | |
static JUNO_STATUS_T | Verify (JUNO_MEMORY_ALLOC_T *ptJunoMemory) |
static JUNO_STATUS_T | Juno_MemoryBlkGet (JUNO_MEMORY_ALLOC_T *ptJunoMemory, JUNO_MEMORY_T *ptMemory, size_t zSize) |
static JUNO_STATUS_T | Juno_MemoryBlkUpdate (JUNO_MEMORY_ALLOC_T *ptJunoMemory, JUNO_MEMORY_T *ptMemory, size_t zNewSize) |
static JUNO_STATUS_T | Juno_MemoryBlkPut (JUNO_MEMORY_ALLOC_T *ptJunoMemory, JUNO_MEMORY_T *ptMemory) |
JUNO_STATUS_T | JunoMemory_BlockApi (JUNO_MEMORY_ALLOC_T *ptJunoMemory, void *pvMemory, JUNO_MEMORY_BLOCK_METADATA_T *ptMetadata, size_t zTypeSize, size_t zLength, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, JUNO_USER_DATA_T *pvFailureUserData) |
Initializes a memory block for allocation. Sets up a memory block with an associated free stack for managing fixed-size allocations. | |
Variables | |
static const JUNO_MEMORY_ALLOC_API_T | tJunoMemoryBlockApi |
|
static |
|
static |
|
static |
JUNO_STATUS_T JunoMemory_BlockApi | ( | JUNO_MEMORY_ALLOC_T * | ptJunoMemory, |
void * | pvMemory, | ||
JUNO_MEMORY_BLOCK_METADATA_T * | ptMetadata, | ||
size_t | zTypeSize, | ||
size_t | zLength, | ||
JUNO_FAILURE_HANDLER_T | pfcnFailureHandler, | ||
JUNO_USER_DATA_T * | pvFailureUserData | ||
) |
Initializes a memory block for allocation. Sets up a memory block with an associated free stack for managing fixed-size allocations.
ptMemBlk | Pointer to the memory block structure to initialize. |
pvMemory | Pointer to the contiguous memory used for allocations. |
pvMetadata | Pointer to an array for block metadata tracking. |
zTypeSize | Size in bytes of each element in the block. |
zLength | Total number of possible allocations. |
pfcnFailureHandler | Callback function to handle failures. |
pvUserData | User data passed to the failure handler. |
|
inlinestatic |
|
static |