HPM APP
HPMicro Application solution
monitor_mem.c File Reference
#include <stdint.h>
#include <stddef.h>
#include "monitor_kconfig.h"
#include "monitor_mem.h"

Macros

#define ALIGN_SIZE   4
 
#define ALIGN(n)   (((n) + ALIGN_SIZE - 1) & ~(ALIGN_SIZE - 1))
 
#define HEADER_SIZE   sizeof(uint32_t)
 
#define MIN_BLOCK_SIZE   (HEADER_SIZE + ALIGN_SIZE)
 
#define MONITOR_DATA_POOL   MONITOR_PRIVATE_VAR_NAME(data_pool)
 

Functions

static void set_header (uint8_t *addr, uint32_t val)
 
void monitor_mem_reset (void)
 
void * monitor_mem_alloc (size_t size)
 
void monitor_mem_free (void *ptr)
 

Macro Definition Documentation

◆ ALIGN

#define ALIGN (   n)    (((n) + ALIGN_SIZE - 1) & ~(ALIGN_SIZE - 1))

◆ ALIGN_SIZE

#define ALIGN_SIZE   4

◆ HEADER_SIZE

#define HEADER_SIZE   sizeof(uint32_t)

◆ MIN_BLOCK_SIZE

#define MIN_BLOCK_SIZE   (HEADER_SIZE + ALIGN_SIZE)

◆ MONITOR_DATA_POOL

#define MONITOR_DATA_POOL   MONITOR_PRIVATE_VAR_NAME(data_pool)

Function Documentation

◆ monitor_mem_alloc()

void* monitor_mem_alloc ( size_t  size)

◆ monitor_mem_free()

void monitor_mem_free ( void *  ptr)

◆ monitor_mem_reset()

void monitor_mem_reset ( void  )

◆ set_header()

static void set_header ( uint8_t *  addr,
uint32_t  val 
)
inlinestatic