Skip to content

Commit

Permalink
malloc: no longer need to round mempool's max_sz
Browse files Browse the repository at this point in the history
Since commit 465b2cf this value is rounded at compile time instead.

Signed-off-by: Nicolas Pitre <[email protected]>
  • Loading branch information
Nicolas Pitre authored and nashif committed Jun 26, 2019
1 parent 744df1e commit d4b60d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libc/minimal/source/stdlib/malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void *realloc(void *ptr, size_t requested_size)
/* Determine size of previously allocated block by its level.
* Most likely a bit larger than the original allocation
*/
block_size = _ALIGN4(blk->pool->base.max_sz);
block_size = blk->pool->base.max_sz;
for (int i = 1; i <= blk->level; i++) {
block_size = _ALIGN4(block_size / 4);
}
Expand Down

0 comments on commit d4b60d6

Please sign in to comment.