4 class BoundsCheckingPolicy,
5 class MemoryMarkingPolicy
12 class BoundsCheckingPolicy,
13 class MemoryMarkingPolicy
20 const size_t newSize = size + BoundsCheckingPolicy::SizeFront + BoundsCheckingPolicy::SizeBack;
24 char*
const ptr =
static_cast<char*
>(
_allocator.allocate(newSize, alignment, offset + BoundsCheckingPolicy::SizeFront));
25 const size_t allocatedSize =
_allocator.getSize(ptr);
28 _memoryMarker.markAllocation(ptr + BoundsCheckingPolicy::SizeFront, allocatedSize - BoundsCheckingPolicy::SizeFront - BoundsCheckingPolicy::SizeBack);
33 return (ptr + BoundsCheckingPolicy::SizeFront);
39 class BoundsCheckingPolicy,
40 class MemoryMarkingPolicy
47 char*
const originalMemory =
static_cast<char*
>(ptr) - BoundsCheckingPolicy::SizeFront;
48 const size_t allocatedSize =
_allocator.getSize(originalMemory);
55 _memoryMarker.markDeallocation(originalMemory, allocatedSize);
65 class BoundsCheckingPolicy,
66 class MemoryMarkingPolicy
80 class BoundsCheckingPolicy,
81 class MemoryMarkingPolicy
90 class BoundsCheckingPolicy,
91 class MemoryMarkingPolicy
ThreadPolicy _threadGuard
BoundsCheckingPolicy _boundsChecker
MemoryMarkingPolicy _memoryMarker
void * allocate(size_t size, size_t alignment, size_t offset, const char *file, size_t line)