mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-13 09:11:57 +00:00
This test was just wrong. If the current thread did not race with any others during the allocation process, then the result will be false because it was detected so earlier in the function. If we did race, then sure: it might be true now if someone snuck in and freed a block. But so what? We already have the block we want to break. The behavior in the code as written was to early-exit from the break loop, returning a buffer that was larger than the one requested (though otherwise benign -- we wouldn't leak, just waste memory). No idea what I was thinking. Thanks to Du Quanwen for the diagnosis. Signed-off-by: Andy Ross <andrew.j.ross@intel.com> |
||
---|---|---|
.. | ||
configs | ||
include | ||
alert.c | ||
atomic_c.c | ||
compiler_stack_protect.c | ||
device.c | ||
errno.c | ||
idle.c | ||
init.c | ||
int_latency_bench.c | ||
Kconfig | ||
Kconfig.event_logger | ||
Kconfig.power_mgmt | ||
mailbox.c | ||
Makefile | ||
mem_slab.c | ||
mempool.c | ||
msg_q.c | ||
mutex.c | ||
pipes.c | ||
poll.c | ||
queue.c | ||
sched.c | ||
sem.c | ||
stack.c | ||
sys_clock.c | ||
system_work_q.c | ||
thread_abort.c | ||
thread.c | ||
timer.c | ||
version.c | ||
work_q.c |