-Changed memory functions, Memory::alloc_static*, simplified them, made them aligned to 16

-Changed Vector<> template to fit this.
This commit is contained in:
Juan Linietsky 2017-01-06 10:15:44 -03:00
parent 99ceddd11e
commit 53ce643e52
18 changed files with 340 additions and 1125 deletions

View file

@ -30,7 +30,7 @@
#ifdef UNIX_ENABLED
#include "memory_pool_static_malloc.h"
#include "os/memory_pool_dynamic_static.h"
#include "thread_posix.h"
#include "semaphore_posix.h"
@ -116,7 +116,6 @@ int OS_Unix::unix_initialize_audio(int p_audio_driver) {
return 0;
}
static MemoryPoolStaticMalloc *mempool_static=NULL;
static MemoryPoolDynamicStatic *mempool_dynamic=NULL;
@ -145,7 +144,6 @@ void OS_Unix::initialize_core() {
PacketPeerUDPPosix::make_default();
IP_Unix::make_default();
#endif
mempool_static = new MemoryPoolStaticMalloc;
mempool_dynamic = memnew( MemoryPoolDynamicStatic );
ticks_start=0;
@ -157,7 +155,6 @@ void OS_Unix::finalize_core() {
if (mempool_dynamic)
memdelete( mempool_dynamic );
delete mempool_static;
}