RetroArch
Macros | Functions | Variables
mem2_manager.c File Reference
#include <string.h>
#include <malloc.h>
#include <unistd.h>
#include <ogc/machine/asm.h>
#include <ogc/lwp_heap.h>
#include <ogc/system.h>
#include <retro_inline.h>
#include "mem2_manager.h"
Include dependency graph for mem2_manager.c:

Macros

#define ROUNDUP32(v)   (((uint32_t)(v) + 0x1f) & ~0x1f)
 

Functions

static INLINE heap_block__lwp_heap_blockat (heap_block *block, uint32_t offset)
 
static INLINE heap_block__lwp_heap_usrblockat (void *ptr)
 
static INLINE bool __lwp_heap_blockin (heap_cntrl *heap, heap_block *block)
 
static INLINE bool __lwp_heap_blockfree (heap_block *block)
 
static INLINE uint32_t __lwp_heap_blocksize (heap_block *block)
 
static uint32_t __lwp_heap_block_size (heap_cntrl *theheap, void *ptr)
 
bool gx_init_mem2 (void)
 
void_mem2_memalign (uint8_t align, uint32_t size)
 
void_mem2_malloc (uint32_t size)
 
void _mem2_free (void *ptr)
 
void_mem2_realloc (void *ptr, uint32_t newsize)
 
void_mem2_calloc (uint32_t num, uint32_t size)
 
char * _mem2_strdup (const char *s)
 
char * _mem2_strndup (const char *s, size_t n)
 
uint32_t gx_mem2_used (void)
 
uint32_t gx_mem2_total (void)
 
void__real_malloc (size_t size)
 
void__real_calloc (size_t n, size_t size)
 
void__real_memalign (size_t a, size_t size)
 
void __real_free (void *p)
 
void__real_realloc (void *p, size_t size)
 
void__real_strdup (const char *s)
 
void__real_strndup (const char *s, size_t n)
 
size_t __real_malloc_usable_size (void *p)
 
 __attribute__ ((used))
 

Variables

uint32_t MALLOC_MEM2 = 0
 
static heap_cntrl gx_mem2_heap
 

Macro Definition Documentation

◆ ROUNDUP32

#define ROUNDUP32 (   v)    (((uint32_t)(v) + 0x1f) & ~0x1f)

Function Documentation

◆ __attribute__()

__attribute__ ( (used)  )
Here is the call graph for this function:

◆ __lwp_heap_block_size()

static uint32_t __lwp_heap_block_size ( heap_cntrl theheap,
void ptr 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __lwp_heap_blockat()

static INLINE heap_block* __lwp_heap_blockat ( heap_block block,
uint32_t  offset 
)
static
Here is the caller graph for this function:

◆ __lwp_heap_blockfree()

static INLINE bool __lwp_heap_blockfree ( heap_block block)
static
Here is the caller graph for this function:

◆ __lwp_heap_blockin()

static INLINE bool __lwp_heap_blockin ( heap_cntrl heap,
heap_block block 
)
static
Here is the caller graph for this function:

◆ __lwp_heap_blocksize()

static INLINE uint32_t __lwp_heap_blocksize ( heap_block block)
static
Here is the caller graph for this function:

◆ __lwp_heap_usrblockat()

static INLINE heap_block* __lwp_heap_usrblockat ( void ptr)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ __real_calloc()

void* __real_calloc ( size_t  n,
size_t  size 
)

◆ __real_free()

void __real_free ( void p)

◆ __real_malloc()

void* __real_malloc ( size_t  size)
Here is the caller graph for this function:

◆ __real_malloc_usable_size()

size_t __real_malloc_usable_size ( void p)

◆ __real_memalign()

void* __real_memalign ( size_t  a,
size_t  size 
)

◆ __real_realloc()

void* __real_realloc ( void p,
size_t  size 
)

◆ __real_strdup()

void* __real_strdup ( const char *  s)

◆ __real_strndup()

void* __real_strndup ( const char *  s,
size_t  n 
)

◆ _mem2_calloc()

void* _mem2_calloc ( uint32_t  num,
uint32_t  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _mem2_free()

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

◆ _mem2_malloc()

void* _mem2_malloc ( uint32_t  size)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _mem2_memalign()

void* _mem2_memalign ( uint8_t  align,
uint32_t  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _mem2_realloc()

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

◆ _mem2_strdup()

char* _mem2_strdup ( const char *  s)
Here is the call graph for this function:

◆ _mem2_strndup()

char* _mem2_strndup ( const char *  s,
size_t  n 
)
Here is the call graph for this function:

◆ gx_init_mem2()

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

◆ gx_mem2_total()

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

◆ gx_mem2_used()

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

Variable Documentation

◆ gx_mem2_heap

heap_cntrl gx_mem2_heap
static

◆ MALLOC_MEM2

uint32_t MALLOC_MEM2 = 0