-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,6 @@
#include "os_windows.h"
#include "drivers/gles3/rasterizer_gles3.h"
#include "drivers/unix/memory_pool_static_malloc.h"
#include "os/memory_pool_dynamic_static.h"
#include "drivers/windows/thread_windows.h"
#include "drivers/windows/semaphore_windows.h"
@ -167,7 +166,6 @@ const char * OS_Windows::get_audio_driver_name(int p_driver) const {
return AudioDriverManagerSW::get_driver(p_driver)->get_name();
}
static MemoryPoolStatic *mempool_static=NULL;
static MemoryPoolDynamic *mempool_dynamic=NULL;
void OS_Windows::initialize_core() {
@ -196,7 +194,6 @@ void OS_Windows::initialize_core() {
StreamPeerWinsock::make_default();
PacketPeerUDPWinsock::make_default();
mempool_static = new MemoryPoolStaticMalloc;
#if 1
mempool_dynamic = memnew( MemoryPoolDynamicStatic );
#else
@ -1308,7 +1305,6 @@ void OS_Windows::finalize_core() {
if (mempool_dynamic)
memdelete( mempool_dynamic );
delete mempool_static;
TCPServerWinsock::cleanup();