LibJuno 0.1.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
memory_api.h
Go to the documentation of this file.
1#ifndef JUNO_MEMORY_API_H
2#define JUNO_MEMORY_API_H
3#include "juno/status.h"
4#include <stddef.h>
5#include <stdint.h>
6#ifdef __cplusplus
7extern "C" {
8#endif
9
11
13
19{
26 JUNO_STATUS_T (*Get)(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *pvRetAddr, size_t zSize);
27
34 JUNO_STATUS_T (*Update)(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *ptMemory, size_t zNewSize);
35
42};
43
44#ifdef __cplusplus
45}
46#endif
47#endif
48
49
enum JUNO_STATUS_TAG JUNO_STATUS_T
API for generic memory allocation operations.
Definition memory_api.h:19
JUNO_STATUS_T(* Get)(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *pvRetAddr, size_t zSize)
Allocates memory using the specified memory allocation method.
Definition memory_api.h:26
JUNO_STATUS_T(* Update)(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *ptMemory, size_t zNewSize)
Updates an existing memory allocation to a new size.
Definition memory_api.h:34
JUNO_STATUS_T(* Put)(JUNO_MEMORY_ALLOC_T *ptMem, JUNO_MEMORY_T *pvAddr)
Frees an allocated memory block.
Definition memory_api.h:41
Structure for an allocated memory segment. Describes the allocated memory with a pointer to the start...
Definition memory_types.h:60
Union for a generic memory allocation. Accommodates various allocation types, currently including blo...
Definition memory_types.h:89