AKOS  v1.0.0
Documentation
Loading...
Searching...
No Matches
memory.h File Reference

Static-heap allocator APIs. More...

#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
Include dependency graph for memory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mem_blk_header_t

Enumerations

enum  mem_state_t { MEM_STATE_FREE = 0 , MEM_STATE_BUSY }

Functions

void * akos_memory_malloc (size_t size)
 Allocate memory from OS heap.
void akos_memory_free (void *p_addr)
 Free previously allocated memory block.

Detailed Description

Static-heap allocator APIs.

Author
Snoopy3921 - AK Foundation
Date
2026/05/08

Definition in file memory.h.

Enumeration Type Documentation

◆ mem_state_t

enum mem_state_t

Definition at line 25 of file memory.h.

Function Documentation

◆ akos_memory_free()

void akos_memory_free ( void * p_addr)

Free previously allocated memory block.

Parameters
p_addrPointer returned by akos_memory_malloc.

Free previously allocated memory block.

Parameters
p_addrPointer returned by akos_memory_malloc.

Definition at line 139 of file memory.c.

◆ akos_memory_malloc()

void * akos_memory_malloc ( size_t size)

Allocate memory from OS heap.

Parameters
sizeRequested size in bytes.
Returns
Pointer to allocated block, or NULL on failure.

Allocate memory from OS heap.

Parameters
sizeRequested size in bytes.
Returns
Pointer to payload, or NULL if no suitable block.

Definition at line 65 of file memory.c.