Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
heap.c File Reference

Go to the source code of this file.

Functions

HeapNodegeneral_heap_create (void)
 
void * general_heap_malloc (s32 size)
 
void * general_heap_malloc_tail (s32 size)
 
s32 general_heap_free (void *data)
 
s32 battle_heap_create (void)
 
s32 func_8002ACDC (void)
 
void * heap_malloc (s32 size)
 
s32 heap_free (void *data)
 
s32 collision_heap_create (void)
 
void * collision_heap_malloc (s32 size)
 
s32 collision_heap_free (void *data)
 

Variables

HeapNode heap_generalHead
 
HeapNode heap_collisionHead
 

Function Documentation

◆ general_heap_create()

HeapNode * general_heap_create ( void )

◆ general_heap_malloc()

void * general_heap_malloc ( s32 size)

Definition at line 10 of file heap.c.

10 {
11 return _heap_malloc(&heap_generalHead, size);
12}
void * _heap_malloc(HeapNode *head, u32 size)
Definition 43F0.c:78

◆ general_heap_malloc_tail()

void * general_heap_malloc_tail ( s32 size)

Definition at line 14 of file heap.c.

14 {
16}
void * _heap_malloc_tail(HeapNode *head, u32 size)
Definition 43F0.c:153

◆ general_heap_free()

◆ battle_heap_create()

s32 battle_heap_create ( void )

Definition at line 22 of file heap.c.

22 {
24 return -1;
25 } else {
26 return 0;
27 }
28}
#define BATTLE_HEAP_SIZE
Definition macros.h:114
HeapNode heap_battleHead

Referenced by battle_heap_create_obfuscated(), state_step_end_battle(), state_step_file_select(), and state_step_pause().

◆ func_8002ACDC()

s32 func_8002ACDC ( void )

Definition at line 30 of file heap.c.

30 {
31 return 0;
32}

Referenced by state_step_end_battle(), and state_step_unpause().

◆ heap_malloc()

void * heap_malloc ( s32 size)

Definition at line 34 of file heap.c.

34 {
36 return general_heap_malloc(size);
37 } else {
38 return _heap_malloc(&heap_battleHead, size);
39 }
40}
#define general_heap_malloc
@ CONTEXT_WORLD
Definition enums.h:3529
GameStatus * gGameStatusPtr
Definition main_loop.c:32

Referenced by add_anim_node(), ALT_clear_hud_element_cache(), ALT_load_entity_model(), clear_virtual_entity_list(), clone_model(), create_actor(), create_encounters(), create_entity(), create_mesh_animator(), create_model_animator(), create_npc_impl(), create_shadow_from_data(), create_trigger(), create_worker_backUI(), create_worker_frontUI(), create_worker_world(), enable_npc_blur(), evt_handle_allocate_array(), func_802C39F8(), get_asset_offset(), hud_element_create(), imgfx_load_anim(), imgfx_mesh_anim_update(), imgfx_update(), load_asset_by_name(), load_battle_hit_asset(), load_entity_model(), load_map_hit_asset(), load_partner_actor(), load_path_data(), load_player_actor(), make_item_entity(), make_item_entity_at_player(), mdl_create_model(), mdl_make_local_vertex_copy(), mdl_make_transform_group(), msg_copy_to_print_buffer(), npc_follow_init(), reset_model_animators(), show_immune_bonk(), start_child_script(), start_script(), start_script_in_group(), state_init_logos(), state_init_title_screen(), and update_item_entity_collectable().

◆ heap_free()

◆ collision_heap_create()

s32 collision_heap_create ( void )

Definition at line 50 of file heap.c.

50 {
52 return -1;
53 }
54 return 0;
55}
HeapNode heap_collisionHead
Definition heaps2.c:7
#define COLLISION_HEAP_SIZE
Definition macros.h:111

Referenced by initialize_collision().

◆ collision_heap_malloc()

void * collision_heap_malloc ( s32 size)

Definition at line 57 of file heap.c.

57 {
59 return _heap_malloc(&heap_collisionHead, size);
60 } else {
61 return _heap_malloc(&heap_battleHead, size);
62 }
63}

Referenced by load_hit_data(), and parent_collider_to_model().

◆ collision_heap_free()

s32 collision_heap_free ( void * data)

Definition at line 65 of file heap.c.

65 {
67 return _heap_free(&heap_battleHead, data);
68 } else {
69 return _heap_free(&heap_collisionHead, data);
70 }
71}

Referenced by parent_collider_to_model().

Variable Documentation

◆ heap_generalHead

HeapNode heap_generalHead
extern

◆ heap_collisionHead

HeapNode heap_collisionHead
extern

Definition at line 7 of file heaps2.c.

Referenced by collision_heap_create(), collision_heap_free(), and collision_heap_malloc().