Commit
79459f631546eea83d4158f535c20ebd4ac18987 copied portions of
com32/lib/realloc.c into core/mem/malloc.c, with minor changes
for accessing allocation arena header attributes. The previous
code used structure members and the current code uses bitmask
macros.
On a particular line in the original realloc(), there were two
assignments in a single expression that included a compound
assignment. This fact was missed when the code was copied and
modified to use the bitmask macros.
Signed-off-by: Shao Miller <sha0.miller@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
ah->a.next->a.prev = ah;
nah->next_free->prev_free = nah->prev_free;
nah->prev_free->next_free = nah->next_free;
- ARENA_SIZE_SET(ah->a.attrs, ARENA_SIZE_GET(nah->a.attrs));
+ ARENA_SIZE_SET(ah->a.attrs, ARENA_SIZE_GET(ah->a.attrs) +
+ ARENA_SIZE_GET(nah->a.attrs));
xsize = ARENA_SIZE_GET(ah->a.attrs);
- //xsize = (ah->a.size += nah->a.size);
}
if (xsize >= newsize) {