Skip to content
Snippets Groups Projects
Commit 3cba4ca6 authored by Yuriy Vostrikov's avatar Yuriy Vostrikov
Browse files

Fix palloc bug introduced in post review "fixes".

parent da8df0d4
No related branches found
No related tags found
No related merge requests found
...@@ -285,7 +285,7 @@ prelease(struct palloc_pool *pool) ...@@ -285,7 +285,7 @@ prelease(struct palloc_pool *pool)
for (chunk = SLIST_FIRST(&pool->chunks); chunk != NULL; chunk = next_chunk) { for (chunk = SLIST_FIRST(&pool->chunks); chunk != NULL; chunk = next_chunk) {
next_chunk = SLIST_NEXT(chunk, busy_link); next_chunk = SLIST_NEXT(chunk, busy_link);
if (chunk->size <= palloc_greatest_size()) { if (chunk->size <= palloc_greatest_size()) {
chunk->free = chunk->size; chunk->free = chunk->size - sizeof(struct chunk);
chunk->brk = (void *)chunk + sizeof(struct chunk); chunk->brk = (void *)chunk + sizeof(struct chunk);
SLIST_INSERT_HEAD(&chunk->class->chunks, chunk, free_link); SLIST_INSERT_HEAD(&chunk->class->chunks, chunk, free_link);
poison_chunk(chunk); poison_chunk(chunk);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment