It is possible to have DEBUG disabled but asserts on (NDEBUG), which
cannot build because these asserts work on members that are only present
when DEBUG is on.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
linear_size_chunk *ptr;
unsigned full_size;
+#ifdef DEBUG
assert(first->magic == LMAGIC);
+#endif
assert(!latest->next);
size = ALIGN_POT(size, SUBALLOC_ALIGNMENT);
return;
node = LINEAR_PARENT_TO_HEADER(ptr);
+#ifdef DEBUG
assert(node->magic == LMAGIC);
+#endif
while (node) {
void *ptr = node;
return;
node = LINEAR_PARENT_TO_HEADER(ptr);
+#ifdef DEBUG
assert(node->magic == LMAGIC);
+#endif
while (node) {
ralloc_steal(new_ralloc_ctx, node);
ralloc_parent_of_linear_parent(void *ptr)
{
linear_header *node = LINEAR_PARENT_TO_HEADER(ptr);
+#ifdef DEBUG
assert(node->magic == LMAGIC);
+#endif
return node->ralloc_parent;
}