]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commit
Enable per-library allocator statistics
authorSimon Kuenzer <simon.kuenzer@neclab.eu>
Sun, 22 Nov 2020 00:00:03 +0000 (01:00 +0100)
committerSimon Kuenzer <simon.kuenzer@neclab.eu>
Fri, 25 Jun 2021 16:14:02 +0000 (18:14 +0200)
commit9a7aa73ba7526e88c5c9636667e3e012f2042c81
treeb86d348569277a0986cc8c74a20b107513d7431e
parent676244e7bdb543f1cdb4c7511a574a11ec3c9205
Enable per-library allocator statistics

Instruments the library so that per-library allocator statistics are
possible. We make sure that code that uses `malloc()`, `free()`, and
company will resolve `uk_alloc_get_default()` within their compilation
scope so that the individual wrapper allocators can be used.
For this purpose, we declare the allocator functions as `static inline`
within the corresponding headers (like `<stdlib.h>`). Since the libc
headers are modified, we apply the new behavior only when
`CONFIG_LIBUKALLOC_IFSTATS` is switched on.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
Reviewed-by: Cezar Craciunoiu <cezar.craciunoiu@gmail.com>
patches/0010-enable-per-library-allocator-statistics.patch [new file with mode: 0644]