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

[core] fix palloc bug

parent a7deb540
No related branches found
No related tags found
No related merge requests found
......@@ -275,7 +275,7 @@ prelease(struct palloc_pool *pool)
for (chunk = SLIST_FIRST(&pool->chunks); chunk != NULL; chunk = next_chunk) {
next_chunk = SLIST_NEXT(chunk, busy_link);
if (chunk->size <= palloc_greatest_size()) {
chunk->free = chunk->size - sizeof(struct chunk);
chunk->free = chunk->size;
chunk->brk = (void *)chunk + sizeof(struct chunk);
SLIST_INSERT_HEAD(&chunk->class->chunks, chunk, free_link);
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