RetroArch
Classes | Macros | Functions | Variables
ctr_linear.cpp File Reference
#include <3ds.h>
#include <stdlib.h>
#include <3ds/util/rbtree.h>
#include "ctr_debug.h"
Include dependency graph for ctr_linear.cpp:

Classes

struct  MemChunk
 
struct  MemBlock
 
struct  MemPool
 
struct  addrMapNode
 

Macros

#define getAddrMapNode(x)   rbtree_item((x), addrMapNode, node)
 

Functions

static int addrMapNodeComparator (const rbtree_node_t *_lhs, const rbtree_node_t *_rhs)
 
static void addrMapNodeDestructor (rbtree_node_t *a)
 
static addrMapNodegetNode (void *addr)
 
static addrMapNodenewNode (const MemChunk &chunk)
 
static void delNode (addrMapNode *node)
 
static bool linearInit (void)
 
voidlinearMemAlign (size_t size, size_t alignment)
 
voidlinearAlloc (size_t size)
 
voidlinearRealloc (void *mem, size_t size)
 
void linearFree (void *mem)
 
u32 linearSpaceFree ()
 
u32 ctr_get_linear_free (void)
 
u32 ctr_get_linear_unused (void)
 
void ctr_linear_free_pages (u32 pages)
 
void ctr_linear_get_stats (void)
 

Variables

static rbtree_t sAddrMap
 
u32 __linear_heap
 
u32 __linear_heap_size
 
static MemPool sLinearPool
 
static u32 sLinearPool_maxaddr
 

Macro Definition Documentation

◆ getAddrMapNode

#define getAddrMapNode (   x)    rbtree_item((x), addrMapNode, node)

Function Documentation

◆ addrMapNodeComparator()

static int addrMapNodeComparator ( const rbtree_node_t *  _lhs,
const rbtree_node_t *  _rhs 
)
static
Here is the caller graph for this function:

◆ addrMapNodeDestructor()

static void addrMapNodeDestructor ( rbtree_node_t *  a)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ctr_get_linear_free()

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

◆ ctr_get_linear_unused()

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

◆ ctr_linear_free_pages()

void ctr_linear_free_pages ( u32  pages)
Here is the caller graph for this function:

◆ ctr_linear_get_stats()

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

◆ delNode()

static void delNode ( addrMapNode node)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNode()

static addrMapNode* getNode ( void addr)
static
Here is the caller graph for this function:

◆ linearAlloc()

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

◆ linearFree()

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

◆ linearInit()

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

◆ linearMemAlign()

void* linearMemAlign ( size_t  size,
size_t  alignment 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ linearRealloc()

void* linearRealloc ( void mem,
size_t  size 
)

◆ linearSpaceFree()

u32 linearSpaceFree ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ newNode()

static addrMapNode* newNode ( const MemChunk chunk)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ __linear_heap

u32 __linear_heap

◆ __linear_heap_size

u32 __linear_heap_size

◆ sAddrMap

rbtree_t sAddrMap
static

◆ sLinearPool

MemPool sLinearPool
static

◆ sLinearPool_maxaddr

u32 sLinearPool_maxaddr
static