/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/src/sgx/core/memory/alloccpp.cpp

*/

#include "sgx/core/core.hpp"

CSGXMemoryAllocatorStdCPP::CSGXMemoryAllocatorStdCPP(void *ptr, const tMEM_SIZE size, const CSGXMemoryAlignment &alignment) :
	CSGXMemoryAllocator(ptr, size, alignment) {
}

void *CSGXMemoryAllocatorStdCPP::alloc(const tMEM_SIZE size) {
	return (void *)new tBYTE[size];
}
 
tBOOL CSGXMemoryAllocatorStdCPP::freePtr(void *ptr) {
	delete (tBYTE *)ptr;
	return TRUE;
}
 
tBOOL CSGXMemoryAllocatorStdCPP::freeAll() {
	return FALSE;
}
