dbghelp: Improved arena allocation in pool_alloc.

This commit is contained in:
Jacek Caban 2009-08-14 14:51:09 +02:00 committed by Alexandre Julliard
parent 1690044d78
commit 4e1a4ecc04
1 changed files with 3 additions and 3 deletions

View File

@ -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