60 void* allocate(
size_t size,
const char* file,
int line)
62 size_t pad = N - 1 +
sizeof(size_t);
63 uint8_t* base =
reinterpret_cast<uint8_t*
>(BaseAllocator::allocate(size + pad, file, line));
67 uint8_t* ptr =
reinterpret_cast<uint8_t*
>(size_t(base + pad) & ~(size_t(N) - 1));
70 reinterpret_cast<size_t*
>(ptr)[-1] =
size_t(ptr - base);
74 void deallocate(
void* ptr)
79 uint8_t* base =
reinterpret_cast<uint8_t*
>(ptr) -
reinterpret_cast<size_t*
>(ptr)[-1];
80 BaseAllocator::deallocate(base);
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39