Microchip® Advanced Software Framework

memory.c File Reference

Memory allocation for event.

Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.

#include <stdint.h>
#include <stdbool.h>
#include "string.h"
#include "memory.h"

Functions

void * mem_alloc (uint32_t size)
 
uint8_t mem_free (void *ptr, uint32_t size)
 
void mem_init (uint8_t *base_addr, uint32_t size)
 

Variables

int32_t head
 
uint32_t max_count
 
uint8_t * mem_pool_base_addr
 
uint32_t mem_pool_size
 
int32_t tail
 

void* mem_alloc ( uint32_t  size)

References head, mem_pool_base_addr, mem_pool_size, NULL, and tail.

Referenced by event_fifo_write().

uint8_t mem_free ( void *  ptr,
uint32_t  size 
)
void mem_init ( uint8_t *  base_addr,
uint32_t  size 
)

References head, mem_pool_base_addr, mem_pool_size, and tail.

Referenced by interface_init(), and lwip_init().

int32_t head

Referenced by mem_alloc(), mem_free(), and mem_init().

uint32_t max_count
uint8_t* mem_pool_base_addr

Referenced by mem_alloc(), mem_free(), and mem_init().

uint32_t mem_pool_size

Referenced by mem_alloc(), mem_free(), and mem_init().

int32_t tail