You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
-Changed memory functions, Memory::alloc_static*, simplified them, made them aligned to 16
-Changed Vector<> template to fit this.
This commit is contained in:
@@ -604,7 +604,7 @@ void PoolAllocator::create_pool(void * p_mem,int p_size,int p_max_entries) {
|
||||
|
||||
PoolAllocator::PoolAllocator(int p_size,bool p_needs_locking,int p_max_entries) {
|
||||
|
||||
mem_ptr=Memory::alloc_static( p_size,"PoolAllocator()");
|
||||
mem_ptr=memalloc( p_size);
|
||||
ERR_FAIL_COND(!mem_ptr);
|
||||
align=1;
|
||||
create_pool(mem_ptr,p_size,p_max_entries);
|
||||
@@ -648,7 +648,7 @@ PoolAllocator::PoolAllocator(int p_align,int p_size,bool p_needs_locking,int p_m
|
||||
PoolAllocator::~PoolAllocator() {
|
||||
|
||||
if (mem_ptr)
|
||||
Memory::free_static( mem_ptr );
|
||||
memfree( mem_ptr );
|
||||
|
||||
memdelete_arr( entry_array );
|
||||
memdelete_arr( entry_indices );
|
||||
|
||||
Reference in New Issue
Block a user