Alchemy
Loading...
Searching...
No Matches

mem.h

Go to the documentation of this file.
1#ifndef ALCHEMY_RUNTIME_MEM_H
2#define ALCHEMY_RUNTIME_MEM_H
3
4/// @file
5/// The heaps: allocating and freeing blocks.
6
7#include "edition.h"
8#include "types.h"
9
11void Runtime_BumpFree(void *buffer);
12void MemFree(void *buffer);
14
15static __inline__ void *Runtime_CallAlternatePool(void *(*allocate)(s32),
16 s32 size) {
17 /* FAKEMATCH: the inline call prevents size sharing, avoiding 12 extra fade
18 * bytes and changed gauge registers. */
19 return allocate(size);
20}
21
22extern u8 gEwramHeap[];
23extern u8 gIwramHeap[];
24
25#endif
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
u8 gEwramHeap[]
void Runtime_BumpFree(void *buffer)
u8 gIwramHeap[]
void Runtime_ReleaseHeapBlock(s32 slot)
void MemFree(void *buffer)
void Runtime_FillFreeHeapWords(u32 value)
static __inline__ void * Runtime_CallAlternatePool(void *(*allocate)(s32), s32 size)
Definition mem.h:15
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
unsigned char u8
Definition types.h:11