]> git.baikalelectronics.ru Git - kernel.git/commit
tools/nolibc/stdlib: Implement `malloc()`, `calloc()`, `realloc()` and `free()`
authorAmmar Faizi <ammarfaizi2@gnuweeb.org>
Tue, 29 Mar 2022 10:17:35 +0000 (17:17 +0700)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 21 Apr 2022 00:05:46 +0000 (17:05 -0700)
commit8392852776a5db962b5f0622d00305d07665faa8
treee5fef00e0b3c413d17e0c1b93af62a19f617fb51
parenta67ad88c6d9ea150a596c5bd99f1c8d79b97183b
tools/nolibc/stdlib: Implement `malloc()`, `calloc()`, `realloc()` and `free()`

Implement basic dynamic allocator functions. These functions are
currently only available on architectures that have nolibc mmap()
syscall implemented. These are not a super-fast memory allocator,
but at least they can satisfy basic needs for having heap without
libc.

Cc: David Laight <David.Laight@ACULAB.COM>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/stdlib.h