AKOS  v1.0.0
Documentation
Loading...
Searching...
No Matches
memory.h
Go to the documentation of this file.
1/****************************************************************************/
12
13#ifndef MEMORY_H
14#define MEMORY_H
15
16#ifdef __cplusplus
17extern "C"
18{
19#endif
20
21#include <stdint.h>
22#include <stdbool.h>
23#include <stddef.h>
24
25 typedef enum
26 {
27 MEM_STATE_FREE = 0,
28 MEM_STATE_BUSY
29 } mem_state_t;
30
31 typedef struct mem_blk_header mem_blk_header_t;
32
34 {
35 size_t size;
36 mem_state_t state;
37 struct mem_blk_header *next_ptr;
38 };
39
45 void *akos_memory_malloc(size_t size);
50 void akos_memory_free(void *p_addr);
51
52#ifdef __cplusplus
53}
54#endif
55#endif /* MEMORY_H */
void akos_memory_free(void *p_addr)
Free previously allocated memory block.
Definition memory.c:139
void * akos_memory_malloc(size_t size)
Allocate memory from OS heap.
Definition memory.c:65