LibJuno 0.22.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
memory_api.h File Reference
#include "juno/status.h"
#include "juno/module.h"
#include <stddef.h>
Include dependency graph for memory_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  JUNO_MEMORY_BLOCK_METADATA_TAG
 The memory metadata. More...
 
struct  JUNO_MEMORY_TAG
 Structure for an allocated memory segment. Describes the allocated memory with a pointer to the start and its size. More...
 
struct  JUNO_MEMORY_ALLOC_API_TAG
 

Macros

#define JUNO_MEMORY_BLOCK(name, type, length)   static type name[length] = {}
 Macro to declare a static memory block and its associated free stack.
 
#define JUNO_MEMORY_BLOCK_METADATA(name, length)   static JUNO_MEMORY_BLOCK_METADATA_T name[length] = {}
 Macro to declare a static array for memory metadata.
 
#define JUNO_REF(name)   REF##name
 Define a reference for memory.
 
#define JUNO_NEW_REF(name)   JUNO_MEMORY_T *JUNO_REF(name)
 Create a new reference for memory.
 

Typedefs

typedef struct JUNO_MEMORY_BLOCK_METADATA_TAG JUNO_MEMORY_BLOCK_METADATA_T
 
typedef struct JUNO_MEMORY_BLOCK_TAG JUNO_MEMORY_BLOCK_T
 
typedef struct JUNO_MEMORY_TAG JUNO_MEMORY_T
 
typedef struct JUNO_MEMORY_ALLOC_API_TAG JUNO_MEMORY_ALLOC_API_T
 

Functions

 JUNO_MODULE_DECLARE (JUNO_MEMORY_ALLOC_T)
 
 JUNO_MODULE_BASE_DECLARE (JUNO_MEMORY_ALLOC_BASE_T)
 
 JUNO_MODULE_BASE (JUNO_MEMORY_ALLOC_BASE_T, JUNO_MEMORY_ALLOC_API_T, JUNO_MODULE_EMPTY)
 

Macro Definition Documentation

◆ JUNO_MEMORY_BLOCK

#define JUNO_MEMORY_BLOCK (   name,
  type,
  length 
)    static type name[length] = {}

Macro to declare a static memory block and its associated free stack.

This API has been generated by LibJuno: https://www.robinonsay.com/libjuno/ This header contains the juno_memory library API

Author
Parameters
nameName of the memory block.
typeData type of each block element.
lengthNumber of elements in the memory block.

◆ JUNO_MEMORY_BLOCK_METADATA

#define JUNO_MEMORY_BLOCK_METADATA (   name,
  length 
)    static JUNO_MEMORY_BLOCK_METADATA_T name[length] = {}

Macro to declare a static array for memory metadata.

Parameters
nameName of the metadata array.
lengthNumber of metadata entries.

◆ JUNO_NEW_REF

#define JUNO_NEW_REF (   name)    JUNO_MEMORY_T *JUNO_REF(name)

Create a new reference for memory.

◆ JUNO_REF

#define JUNO_REF (   name)    REF##name

Define a reference for memory.

Typedef Documentation

◆ JUNO_MEMORY_ALLOC_API_T

◆ JUNO_MEMORY_BLOCK_METADATA_T

◆ JUNO_MEMORY_BLOCK_T

typedef struct JUNO_MEMORY_BLOCK_TAG JUNO_MEMORY_BLOCK_T

◆ JUNO_MEMORY_T

Function Documentation

◆ JUNO_MODULE_BASE()

JUNO_MODULE_BASE ( JUNO_MEMORY_ALLOC_BASE_T  ,
JUNO_MEMORY_ALLOC_API_T  ,
JUNO_MODULE_EMPTY   
)

◆ JUNO_MODULE_BASE_DECLARE()

JUNO_MODULE_BASE_DECLARE ( JUNO_MEMORY_ALLOC_BASE_T  )

◆ JUNO_MODULE_DECLARE()

JUNO_MODULE_DECLARE ( JUNO_MEMORY_ALLOC_T  )