diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2023-01-02 22:48:07 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2023-01-15 10:04:13 +0000 |
commit | 92565e9246f3a47b90fea4a436ecfd8e7a1198b8 (patch) | |
tree | 5e2fa26fff921296729b74bd8947dd225e69c84f /firmware/include/buflib.h | |
parent | f2f198663edc01a1f19e35b8a0c302f8ee47ae5e (diff) | |
download | rockbox-92565e9246f3a47b90fea4a436ecfd8e7a1198b8.tar.gz rockbox-92565e9246f3a47b90fea4a436ecfd8e7a1198b8.zip |
buflib: Add malloc-backed buflib
This is intended for improving the effectiveness of tools like
ASAN when debugging memory errors in the sim. It's not meant to
be a serious allocator for hosted targets.
Enable it by changing the buflib backend in config.h.
Change-Id: I0cf23cefa47ee35dede7b49e0e5b72dac60e8d3e
Diffstat (limited to 'firmware/include/buflib.h')
-rw-r--r-- | firmware/include/buflib.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/include/buflib.h b/firmware/include/buflib.h index 32a5a6abe0..c4865b6d9b 100644 --- a/firmware/include/buflib.h +++ b/firmware/include/buflib.h | |||
@@ -380,6 +380,8 @@ void buflib_check_valid(struct buflib_context *ctx); | |||
380 | 380 | ||
381 | #if CONFIG_BUFLIB_BACKEND == BUFLIB_BACKEND_MEMPOOL | 381 | #if CONFIG_BUFLIB_BACKEND == BUFLIB_BACKEND_MEMPOOL |
382 | #include "buflib_mempool.h" | 382 | #include "buflib_mempool.h" |
383 | #elif CONFIG_BUFLIB_BACKEND == BUFLIB_BACKEND_MALLOC | ||
384 | #include "buflib_malloc.h" | ||
383 | #endif | 385 | #endif |
384 | 386 | ||
385 | #ifndef BUFLIB_ALLOC_OVERHEAD | 387 | #ifndef BUFLIB_ALLOC_OVERHEAD |