RetroArch
Classes | Macros | Functions | Variables
memr.c File Reference
#include <stdlib.h>
#include <string.h>
#include "uip.h"
#include "memr.h"
Include dependency graph for memr.c:

Classes

struct  mem
 

Macros

#define UIP_ERROR(m)
 
#define MIN_SIZE   12
 
#define SIZEOF_STRUCT_MEM   (sizeof(struct mem)+(((sizeof(struct mem)%MEM_ALIGNMENT)==0)?0:(4-(sizeof(struct mem)%MEM_ALIGNMENT))))
 

Functions

static void plug_holes (struct mem *rmem)
 
void memr_init ()
 
voidmemr_malloc (u32 size)
 
void memr_free (void *ptr)
 
voidmemr_realloc (void *ptr, u32 newsize)
 
voidmemr_reallocm (void *ptr, u32 newsize)
 

Variables

static struct memram_free
 
static struct memram_end
 
static u8 ram_block [sizeof(struct mem)+UIP_MEM_SIZE+MEM_ALIGNMENT]
 

Macro Definition Documentation

◆ MIN_SIZE

#define MIN_SIZE   12

◆ SIZEOF_STRUCT_MEM

#define SIZEOF_STRUCT_MEM   (sizeof(struct mem)+(((sizeof(struct mem)%MEM_ALIGNMENT)==0)?0:(4-(sizeof(struct mem)%MEM_ALIGNMENT))))

◆ UIP_ERROR

#define UIP_ERROR (   m)

Function Documentation

◆ memr_free()

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

◆ memr_init()

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

◆ memr_malloc()

void* memr_malloc ( u32  size)
Here is the caller graph for this function:

◆ memr_realloc()

void* memr_realloc ( void ptr,
u32  newsize 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ memr_reallocm()

void* memr_reallocm ( void ptr,
u32  newsize 
)
Here is the call graph for this function:

◆ plug_holes()

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

Variable Documentation

◆ ram_block

u8 ram_block[sizeof(struct mem)+UIP_MEM_SIZE+MEM_ALIGNMENT]
static

◆ ram_end

struct mem* ram_end
static

◆ ram_free

struct mem* ram_free
static