2012-11-14 14:05:25 -05:00
|
|
|
#include <stdlib.h>
|
2012-10-10 15:58:03 +02:00
|
|
|
#include "internal.h"
|
|
|
|
|
|
|
|
|
|
static void* system_alloc(HAllocator *allocator, size_t size) {
|
|
|
|
|
return malloc(size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void* system_realloc(HAllocator *allocator, void* ptr, size_t size) {
|
|
|
|
|
return realloc(ptr, size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void system_free(HAllocator *allocator, void* ptr) {
|
|
|
|
|
free(ptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
HAllocator system_allocator = {
|
|
|
|
|
.alloc = system_alloc,
|
|
|
|
|
.realloc = system_realloc,
|
|
|
|
|
.free = system_free,
|
|
|
|
|
};
|