zephyr/lib/os
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
..
assert.c assert: Completely remove file info and condition expression 2020-01-13 13:59:55 +01:00
base64.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
cbprintf.c lib: add cbprintf capability 2020-11-13 06:38:01 -05:00
cbprintf_complete.c lib: cbprintf: fix mishandling of precision string output 2020-12-18 08:23:24 -05:00
cbprintf_nano.c lib/os/cbprintf_nano.c: simplifications and enhancements 2020-11-17 11:34:25 +01:00
CMakeLists.txt lib: Remove sys_mem_pool implementation 2020-12-07 21:50:14 -05:00
crc7_sw.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
crc8_sw.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
crc16_sw.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
crc32_sw.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
dec.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
fdtable.c lib: fdtable: fix z_free_fd multiple calls fd leak 2020-09-10 16:04:36 -05:00
heap-validate.c lib/os/heap: make "solo free headers" into first-class citizens 2020-07-14 19:35:52 -04:00
heap.c lib/os/heap: fix realloc issues 2021-01-04 11:12:05 -05:00
heap.h code-guideline: Fixing code violation 10.4 Rule 2020-10-01 17:13:29 -04:00
hex.c lib: hex: Remove constant expression 2020-09-02 13:45:50 -04:00
json.c misc: Replace assert include and calls by sys/__assert.h equivalent 2020-10-02 11:42:40 +02:00
Kconfig lib/os: replace z_vprintk with cbprintf 2020-11-13 06:38:01 -05:00
Kconfig.cbprintf lib: add cbprintf capability 2020-11-13 06:38:01 -05:00
mutex.c kernel/timeout: Make timeout arguments an opaque type 2020-03-31 19:40:47 -04:00
notify.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
onoff.c code-guideline: Fixing code violation 10.4 Rule 2020-10-01 17:13:29 -04:00
printk.c lib/os: replace z_vprintk with cbprintf 2020-11-13 06:38:01 -05:00
rb.c cleanup: include/: move misc/rb.h to sys/rb.h 2019-06-27 22:55:49 -04:00
ring_buffer.c lib: os: ring_buffer: Allow using full buffer capacity 2020-11-11 13:17:49 +01:00
sem.c code-guideline: Fixing code violation 10.4 Rule 2020-10-01 17:13:29 -04:00
thread_entry.c lib: os: remove dead code 2019-06-18 09:08:01 -04:00
timeutil.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
work_q.c os: work_q: Use NULL instead of 0 2020-09-02 13:45:50 -04:00