Embedded Artistry Framework
Embedded Systems C++ Framework
Macros | Functions | Variables
memory.c File Reference
#include <malloc.h>
#include <support/memory.h>
Include dependency graph for memory.c:

Macros

#define MEM_BLOCK_SIZE   (1024 * 1024)
 

Functions

void allocate_memory ()
 
bool memory_allocated ()
 
uintptr_t block_start_addr ()
 
uintptr_t block_end_addr ()
 
size_t block_size ()
 

Variables

static volatile bool allocated = false
 
static const size_t memblock_size = MEM_BLOCK_SIZE
 
static uint8_t mem_block [MEM_BLOCK_SIZE]
 
static const uintptr_t mem_block_addr = (uintptr_t)mem_block
 
static const uintptr_t mem_block_addr_end = mem_block_addr + memblock_size
 

Macro Definition Documentation

◆ MEM_BLOCK_SIZE

#define MEM_BLOCK_SIZE   (1024 * 1024)

Function Documentation

◆ allocate_memory()

void allocate_memory ( void  )

References allocated, malloc_addblock(), mem_block, and memblock_size.

Referenced by aligned_malloc_test(), main(), and malloc_test().

Here is the caller graph for this function:

◆ block_end_addr()

uintptr_t block_end_addr ( void  )

References mem_block_addr_end.

Referenced by aligned_malloc_test(), and malloc_test().

Here is the caller graph for this function:

◆ block_size()

size_t block_size ( void  )

References memblock_size.

Referenced by aligned_malloc_test(), and malloc_test().

Here is the caller graph for this function:

◆ block_start_addr()

uintptr_t block_start_addr ( void  )

References mem_block_addr.

Referenced by aligned_malloc_test(), and malloc_test().

Here is the caller graph for this function:

◆ memory_allocated()

bool memory_allocated ( void  )

References allocated.

Referenced by aligned_malloc_test(), and malloc_test().

Here is the caller graph for this function:

Variable Documentation

◆ allocated

volatile bool allocated = false
static

◆ mem_block

uint8_t mem_block[MEM_BLOCK_SIZE]
static

Referenced by allocate_memory().

◆ mem_block_addr

const uintptr_t mem_block_addr = (uintptr_t)mem_block
static

◆ mem_block_addr_end

const uintptr_t mem_block_addr_end = mem_block_addr + memblock_size
static

Referenced by block_end_addr().

◆ memblock_size

const size_t memblock_size = MEM_BLOCK_SIZE
static

Referenced by allocate_memory(), and block_size().