base init
This commit is contained in:
21
src/game/malloc_allocator.h
Normal file
21
src/game/malloc_allocator.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef _MALLOC_ALLOCATOR_H_
|
||||
#define _MALLOC_ALLOCATOR_H_
|
||||
|
||||
// Allocator implementation detail based on default CRT malloc/free.
|
||||
class MallocAllocator {
|
||||
public:
|
||||
MallocAllocator() {}
|
||||
~MallocAllocator() {}
|
||||
|
||||
void SetUp() {}
|
||||
void TearDown() {}
|
||||
|
||||
void* Alloc(size_t size) {
|
||||
return ::malloc(size);
|
||||
}
|
||||
void Free(void* p) {
|
||||
::free(p);
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _MALLOC_ALLOCATOR_H_
|
||||
Reference in New Issue
Block a user