13 bool FreeList::grow(
void* start,
void* end,
size_t alignment,
size_t offset) {
16 start =
static_cast<char*
>(start) + offset;
22 size_t size =
static_cast<char*
>(end) - static_cast<char*>(start) + 1;
24 if (!std::align(alignment,
_size - offset, start, size)) {
28 start =
static_cast<char*
>(start) - offset;
36 size_t size =
static_cast<char*
>(end) - static_cast<char*>(start) + 1;
38 for (
size_t i = 1, count = size /
_size; i < count; ++i) {
39 void*
const next =
static_cast<char*
>(
static_cast<void*
>(it)) +
_size;
42 it =
static_cast<Element*
>(next);
#define LUG_ASSERT(assertion, message)
bool grow(void *start, void *end, size_t alignment, size_t offset)