RetroArch
Classes | Macros | Functions | Variables
mem.c File Reference
#include <string.h>
#include "lwip/arch.h"
#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/mem.h"
#include "lwip/sys.h"
#include "lwip/stats.h"
Include dependency graph for mem.c:

Classes

struct  mem
 

Macros

#define MIN_SIZE   12
 
#define SIZEOF_STRUCT_MEM
 

Functions

static void plug_holes (struct mem *mem)
 
void mem_init (void)
 
void mem_free (void *rmem)
 
voidmem_reallocm (void *rmem, mem_size_t newsize)
 
voidmem_realloc (void *rmem, mem_size_t newsize)
 
voidmem_malloc (mem_size_t size)
 

Variables

static struct memram_end
 
static u8_t ram [MEM_SIZE+sizeof(struct mem)+MEM_ALIGNMENT]
 
static struct memlfree
 
static sys_sem mem_sem
 

Detailed Description

Dynamic memory manager

Macro Definition Documentation

◆ MIN_SIZE

#define MIN_SIZE   12

◆ SIZEOF_STRUCT_MEM

#define SIZEOF_STRUCT_MEM
Value:
(sizeof(struct mem) + \
(((sizeof(struct mem) % MEM_ALIGNMENT) == 0)? 0 : \
(4 - (sizeof(struct mem) % MEM_ALIGNMENT))))
Definition: memr.c:17
#define MEM_ALIGNMENT
Definition: lwipopts.h:50

Function Documentation

◆ mem_free()

void mem_free ( void rmem)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mem_init()

void mem_init ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mem_malloc()

void* mem_malloc ( mem_size_t  size)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mem_realloc()

void* mem_realloc ( void rmem,
mem_size_t  newsize 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mem_reallocm()

void* mem_reallocm ( void rmem,
mem_size_t  newsize 
)
Here is the call graph for this function:

◆ plug_holes()

static void plug_holes ( struct mem mem)
static
Here is the caller graph for this function:

Variable Documentation

◆ lfree

struct mem* lfree
static

◆ mem_sem

sys_sem mem_sem
static

◆ ram

u8_t ram[MEM_SIZE+sizeof(struct mem)+MEM_ALIGNMENT]
static

◆ ram_end

struct mem* ram_end
static