mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +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:
parent
99ceddd11e
commit
53ce643e52
18 changed files with 340 additions and 1125 deletions
|
@ -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 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue