acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
aaa_memory_allocator.h
1
2//#pragma once
3//
4//
5//class CLASS_DECL_ACME clib_memory_allocator
6//{
7//public:
8//
9// inline static void* allocate(memsize s) { return ::malloc(s); }
10// inline static void* realloc(void* p, memsize s) { return ::realloc(p, s); }
11// inline static void free(void* p) { ::free(p); }
12// inline static void zero(void* p) { throw error_unsupported_function; }
13//
14//};
15//
16//
17//class CLASS_DECL_ACME memory_allocator
18//{
19//public:
20//
21// inline static void* allocate(memsize s) { return ::system()->m_pheapmanagement->memory(::heap::e_memory_main)->allocate(s); }
22// inline static void* realloc(void* p, memsize s) { return memory_reallocate(p, s); }
23// inline static void free(void* p) { ::system()->m_pheapmanagement->memory(::heap::e_memory_main)->free(p); }
24// inline static void zero(void* p) { ::zero(p, memory_size(p)); }
25//
26//};
27//
28//