Add function to get number of free entities

scene_man
En Yi 2024-04-22 22:52:59 +08:00
parent 6f3f391d8a
commit 3961366ac4
2 changed files with 6 additions and 0 deletions

View File

@ -230,3 +230,8 @@ void print_mempool_stats(char* buffer)
);
}
}
uint32_t get_num_of_free_entities(void)
{
return ent_mempool.free_list.count;
}

View File

@ -13,4 +13,5 @@ void* get_component_wtih_id(ComponentEnum_t comp_type, unsigned long idx);
void free_component_to_mempool(ComponentEnum_t comp_type, unsigned long idx);
void print_mempool_stats(char* buffer);
uint32_t get_num_of_free_entities(void);
#endif //__MEMPOOL_H