7 #define HEAP_BLOCK_USED 1
8 #define HEAP_BLOCK_FREE 0
10 #define HEAP_DUMMY_FLAG (0+HEAP_BLOCK_USED)
12 #define HEAP_OVERHEAD (sizeof(u32)*2)
13 #define HEAP_BLOCK_USED_OVERHEAD (sizeof(void*)*2)
14 #define HEAP_MIN_SIZE (HEAP_OVERHEAD+sizeof(heap_block))
20 typedef struct _heap_block_st heap_block
;
21 struct _heap_block_st
{
28 typedef struct _heap_iblock_st
{
35 typedef struct _heap_cntrl_st
{
40 heap_block
*perm_null
;
46 u32
__lwp_heap_init(heap_cntrl
*theheap
,void *start_addr
,u32 size
,u32 pg_size
);
47 void* __lwp_heap_allocate(heap_cntrl
*theheap
,u32 size
);
48 BOOL
__lwp_heap_free(heap_cntrl
*theheap
,void *ptr
);
49 u32
__lwp_heap_getinfo(heap_cntrl
*theheap
,heap_iblock
*theinfo
);
51 #ifdef LIBOGC_INTERNAL
52 #include <libogc/lwp_heap.inl>