WiiFlow_Lite/source/memory/mem2.hpp
fix94.1 f1767d5082 -changed version to Beta 4.0.2
-increased usable mem for about 11mb by using mem1_lo (10mb) and no
mem1_hi limit (1mb)
2012-09-07 18:13:04 +00:00

42 lines
900 B
C++

// 1 MEM2 allocator, one for general purpose
// Aligned and padded to 32 bytes, as required by many functions
#ifndef __MEM2_HPP
#define __MEM2_HPP
#ifdef __cplusplus
extern "C"
{
#endif
void MEM_init();
void *MEM1_lo_alloc(unsigned int s);
void MEM1_lo_free(void *p);
void *MEM1_alloc(unsigned int s);
void *MEM1_memalign(unsigned int a, unsigned int s);
void *MEM1_realloc(void *p, unsigned int s);
void MEM1_free(void *p);
unsigned int MEM1_freesize();
void MEM2_cleanup(void);
void MEM2_clear(void);
void MEM2_free(void *p);
void *MEM2_alloc(unsigned int s);
void *MEM2_memalign(unsigned int /* alignment */, unsigned int s);
void *MEM2_realloc(void *p, unsigned int s);
unsigned int MEM2_usableSize(void *p);
unsigned int MEM2_freesize();
#ifdef __cplusplus
}
#endif
enum Alloc
{
ALLOC_MALLOC,
ALLOC_MEM2,
};
#endif // !defined(__MEM2_HPP)