zephyr/lib
Nicolas Pitre aeda6ccdd8 lib/os/heap: fix realloc issues
If the new size amounts to the same number of chunks then:

- If right-chunk is used then we needlessly allocate new memory and
  copy data over.

- If right-chunk is free then we attempt to split it with a zero size
  which corrupts the prev/next list.

Make sure this case is properly handled and add a test for it.

While at it, let's simplify the code somewhat as well.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-01-04 11:12:05 -05:00
..
cmsis_rtos_v1 cmsis: align buffer containing struct k_timer 2020-11-13 14:53:55 -08:00
cmsis_rtos_v2 lib: cmsis_rtos_v2: Handle possible zero length array 2020-09-18 10:13:58 -05:00
fnmatch ext: lib: Move fnmatch to lib/ 2020-03-20 22:56:19 -04:00
gui kernel: subsys: lib: drivers: Use k_heap instead of z_mem_pool wrappers 2020-12-07 21:50:14 -05:00
libc lib: Remove sys_mem_pool implementation 2020-12-07 21:50:14 -05:00
open-amp lib: open-amp: add helper to add resource table in project 2020-04-01 09:21:15 -05:00
os lib/os/heap: fix realloc issues 2021-01-04 11:12:05 -05:00
posix lib/posix: SPARC newlib has unsigned short mode_t 2020-11-13 14:53:55 -08:00
CMakeLists.txt updatehub: Move from lib to subsys:mgmt folder 2020-08-03 16:33:06 +02:00
Kconfig updatehub: Move from lib to subsys:mgmt folder 2020-08-03 16:33:06 +02:00