Commit 4e1a4ecc authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

dbghelp: Improved arena allocation in pool_alloc.

parent 1690044d
......@@ -108,13 +108,13 @@ void* pool_alloc(struct pool* pool, size_t len)
}
}
size = max( pool->arena_size, len + sizeof(struct pool_arena) );
arena = HeapAlloc(GetProcessHeap(), 0, size);
size = max( pool->arena_size, len );
arena = HeapAlloc(GetProcessHeap(), 0, size + sizeof(struct pool_arena));
if (!arena) return NULL;
ret = arena + 1;
arena->current = (char*)ret + len;
arena->end = (char *)arena + size;
arena->end = (char*)ret + size;
if (arena->current + 16 >= arena->end)
list_add_tail( &pool->arena_full, &arena->entry );
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment