Skip to content

Commit d4b60d6

Browse files
Nicolas Pitrenashif
authored andcommitted
malloc: no longer need to round mempool's max_sz
Since commit 465b2cf this value is rounded at compile time instead. Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
1 parent 744df1e commit d4b60d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎lib/libc/minimal/source/stdlib/malloc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void *realloc(void *ptr, size_t requested_size)
105105
/* Determine size of previously allocated block by its level.
106106
* Most likely a bit larger than the original allocation
107107
*/
108-
block_size = _ALIGN4(blk->pool->base.max_sz);
108+
block_size = blk->pool->base.max_sz;
109109
for (int i = 1; i <= blk->level; i++) {
110110
block_size = _ALIGN4(block_size / 4);
111111
}

0 commit comments

Comments
 (0)