Melee Modding Library  2.0.0
A C library for modding Super Smash Bros Melee
system.h
Go to the documentation of this file.
1 
7 #ifndef MML_SYSTEM_H
8 #define MML_SYSTEM_H
9 
10 #include "gctypes.h"
11 
13 extern u32 (*OSCreateHeap)(void*, void*);
14 extern void* (*OSAllocFromHeap)(u32, size_t);
15 extern void (*OSFreeToHeap)(u32, void*);
29 void initHeap(void* lo, void* hi);
30 
39 size_t getHeapSize();
40 
55 void limitGameMemory(void* limit);
56 
73 void* malloc(size_t size);
74 
93 void* calloc(size_t num, size_t size);
94 
117 void* realloc(void* ptr, size_t size)
118  __attribute__ ((warn_unused_result));
119 
134 void free(void* ptr);
135 
136 #endif
Data types for the gamecube.
u32 size_t
Definition: gctypes.h:36
void free(void *ptr)
Deallocate memory block.
Definition: system.c:59
void limitGameMemory(void *limit)
limit size of game heap
Definition: system.c:28
void * malloc(size_t size)
Allocate memory block.
Definition: system.c:33
size_t getHeapSize()
Definition: system.c:64
void * calloc(size_t num, size_t size)
Allocate and zero-initialize array.
Definition: system.c:39
uint32_t u32
Definition: gctypes.h:16
void * realloc(void *ptr, size_t size)
Reallocate memory block.
Definition: system.c:47
void initHeap(void *lo, void *hi)
Definition: system.c:21