1 #ifndef __ALLOC 2 #define __ALLOC 3 4 #include <default.h> 5 6 /* Begin Auto-Generated Part */ 7 #define H_NULL 0 8 #define NULL ((void*)0) 9 #ifndef __HAVE_size_t 10 #define __HAVE_size_t 11 typedef unsigned long size_t; 12 #endif 13 #ifndef __HAVE_Bool 14 #define __HAVE_Bool 15 enum Bool{FALSE,TRUE}; 16 #endif 17 #ifndef __HAVE_HANDLE 18 #define __HAVE_HANDLE 19 typedef unsigned short HANDLE; 20 #endif 21 #ifndef __HAVE_alloca 22 #define __HAVE_alloca 23 void *alloca(long)__ATTR_GCC__; 24 #endif 25 extern void *calloc_throw(short asm("d0"),short asm("d1"))__ATTR_LIB_ASM__; 26 #ifndef __HAVE_calloc 27 #define __HAVE_calloc 28 extern void *calloc(short asm("d0"),short asm("d1"))__ATTR_LIB_ASM__; 29 #endif 30 #define free _rom_call(void,(void*),A3) 31 #define FreeHandles _rom_call(short,(void),23B) 32 #define HeapAlloc _rom_call(HANDLE,(long),90) 33 #define HeapAllocESTACK _rom_call(HANDLE,(long),91) 34 #define HeapAllocHigh _rom_call(HANDLE,(long),92) 35 #define HeapAllocHighThrow _rom_call(HANDLE,(long),94) 36 #define HeapAllocPtr _rom_call(void*,(long),A2) 37 extern void *HeapAllocPtrThrow(long asm("a0"))__ATTR_LIB_ASM__; 38 #define HeapAllocThrow _rom_call(HANDLE,(long),93) 39 #define HeapAvail _rom_call(unsigned long,(void),8F) 40 #define HeapCompress _rom_call(void,(void),95) 41 #define HeapDeref _rom_call(void*,(HANDLE),96) 42 #define HeapEnd _rom_call(void*,(void),A1) 43 #define HeapFree _rom_call(void,(HANDLE),97) 44 #define HeapFreeIndir _rom_call(void,(HANDLE*),98) 45 #define HeapFreePtr _rom_call(void,(void*),A3) 46 #define HeapGetHandle _rom_call(HANDLE,(void),239) 47 #define HeapGetLock _rom_call(short,(HANDLE),9B) 48 #define HeapLock _rom_call(HANDLE,(HANDLE),9A) 49 #define HeapMax _rom_call(unsigned long,(void),9C) 50 #define HeapMoveHigh _rom_call(HANDLE,(HANDLE),A0) 51 #define HeapPtrToHandle _rom_call(HANDLE,(void*),23A) 52 #define HeapRealloc _rom_call(HANDLE,(HANDLE,long),9D) 53 extern HANDLE HeapReallocThrow(HANDLE asm("d0"),long asm("a0"))__ATTR_LIB_ASM__; 54 #define HeapSize _rom_call(unsigned long,(HANDLE),9E) 55 #define HeapUnlock _rom_call(HANDLE,(HANDLE),9F) 56 #define HLock _rom_call(void*,(HANDLE),99) 57 extern void *malloc_throw(long asm("a0"))__ATTR_LIB_ASM__; 58 #define malloc _rom_call(void*,(long),A2) 59 extern void *realloc_throw(void* asm("a0"),long asm("d0"))__ATTR_LIB_ASM__; 60 #ifndef __HAVE_realloc 61 #define __HAVE_realloc 62 extern void *realloc(void* asm("a0"),long asm("d0"))__ATTR_LIB_ASM__; 63 #endif 64 #if MIN_AMS>=200 65 enum HeapWalkCmds{H_WALK_VERIFY=0,H_WALK_STATUS=1,H_WALK_DUMP=2 66 #if MIN_AMS>=204 67 ,H_WALK_SYM=3 68 #endif 69 }; 70 #define HeapShuffle _rom_call(void,(void),474) 71 #define HeapWalk _rom_call(short,(short),12C) 72 #endif 73 /* End Auto-Generated Part */ 74 75 #endif 76