nuttx/arch
yinshengkai d01bbaecc1 sim/heap: malloc returns a valid pointer when allocating 0 bytes.
The default heap management in nuttx returns a valid memory address when malloc(0).
In sim_heap, malloc(0) returns NULL, aligning the behavior of sim_heap with mm_heap

The man manual describes malloc as follows:
https://man7.org/linux/man-pages/man3/malloc.3.html

The malloc() function allocates size bytes and returns a pointer
to the allocated memory.  The memory is not initialized.  If size
is 0, then malloc() returns a unique pointer value that can later
be successfully passed to free().  (See "Nonportable behavior"
for portability issues.)

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-16 17:03:40 +08:00
..
arm bug/fix: Makefile expression error caused 2024-10-16 15:35:04 +08:00
arm64 arch/arm64/src/imx9: Add initial version of canbus driver 2024-10-16 15:43:19 +08:00
avr binfmt/libelf:Remove libelf implementation [2/2] 2024-10-12 12:29:06 +08:00
ceva binfmt/libelf:Remove libelf implementation [2/2] 2024-10-12 12:29:06 +08:00
dummy
hc arch: support customized up_cpu_index() in AMP mode 2024-10-10 02:38:40 +08:00
mips arch: There is no need to use sched_[un]lock 2024-10-12 13:28:23 +08:00
misoc binfmt/libelf:Remove libelf implementation [2/2] 2024-10-12 12:29:06 +08:00
or1k binfmt/libelf:Remove libelf implementation [2/2] 2024-10-12 12:29:06 +08:00
renesas rtc: There is no need to use sched_[un]lock 2024-10-12 13:28:23 +08:00
risc-v arm/riscv: remove redundant judgment 2024-10-15 15:32:40 +08:00
sim sim/heap: malloc returns a valid pointer when allocating 0 bytes. 2024-10-16 17:03:40 +08:00
sparc binfmt/libelf:Remove libelf implementation [2/2] 2024-10-12 12:29:06 +08:00
tricore arch: support customized up_cpu_index() in AMP mode 2024-10-10 02:38:40 +08:00
x86 binfmt/libelf:Remove libelf implementation [2/2] 2024-10-12 12:29:06 +08:00
x86_64 arch/x86_64: Resolving NUC Boot Failure Issue 2024-10-16 13:53:11 +08:00
xtensa cpuinfo: Decouple the fetch cpuinfo from up_perf_getfreq 2024-10-15 21:11:15 +08:00
z16 binfmt/libelf:Remove libelf implementation [2/2] 2024-10-12 12:29:06 +08:00
z80 rtc: There is no need to use sched_[un]lock 2024-10-12 13:28:23 +08:00
CMakeLists.txt greenhills: fix the arch_interface archive error 2024-09-27 23:39:56 +08:00
Kconfig cpuinfo: Decouple the fetch cpuinfo from up_perf_getfreq 2024-10-15 21:11:15 +08:00