mm: fix memory overhead when realloc fallbacks to malloc
authorEunBong Song <eunb.song@samsung.com>
Wed, 29 Mar 2017 01:35:33 +0000 (10:35 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Tue, 18 Apr 2017 03:02:03 +0000 (12:02 +0900)
commitc57c6391a4616902d7d4dae135eed92db8e82e11
tree4c0078bbfc9e1aefb67d542be85f6615a6441413
parentb3163a75532036ec47b8e71341cbb5a157e8676e
mm: fix memory overhead when realloc fallbacks to malloc

When realloc() has to fall back to calling malloc(), size including
overhead was being provided to malloc(), causing a slightly larger
allocation than needed. Noted by initialkjc@yahoo.com

Change-Id: Ic9cb32d8e7ef82f431447e1a58b3e86f8bf9a789
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Song: back-ported 0064dc52e from the NuttX upstream]
Signed-off-by: EunBong Song <eunb.song@samsung.com>
os/mm/mm_heap/mm_realloc.c