|
@@ -53,7 +53,7 @@ realign_pointer(void *ptr)
|
|
|
{
|
|
|
uintptr_t x = (uintptr_t)ptr;
|
|
|
x = (x+MEMAREA_ALIGN_MASK) & ~MEMAREA_ALIGN_MASK;
|
|
|
- tor_assert(((void*)x) >= ptr); // XXXX021 remove this once bug 930 is solved
|
|
|
+ tor_assert(((void*)x) >= ptr);
|
|
|
return (void*)x;
|
|
|
}
|
|
|
|
|
@@ -230,9 +230,10 @@ memarea_alloc(memarea_t *area, size_t sz)
|
|
|
}
|
|
|
result = chunk->next_mem;
|
|
|
chunk->next_mem = chunk->next_mem + sz;
|
|
|
- // XXXX021 remove these once bug 930 is solved.
|
|
|
+
|
|
|
tor_assert(chunk->next_mem >= chunk->u.mem);
|
|
|
tor_assert(chunk->next_mem <= chunk->u.mem+chunk->mem_size);
|
|
|
+
|
|
|
chunk->next_mem = realign_pointer(chunk->next_mem);
|
|
|
return result;
|
|
|
}
|