summaryrefslogtreecommitdiffstats
path: root/firmware/include/buflib.h
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2023-01-02 22:48:07 +0000
committerAidan MacDonald <amachronic@protonmail.com>2023-01-15 10:04:13 +0000
commit92565e9246f3a47b90fea4a436ecfd8e7a1198b8 (patch)
tree5e2fa26fff921296729b74bd8947dd225e69c84f /firmware/include/buflib.h
parentf2f198663edc01a1f19e35b8a0c302f8ee47ae5e (diff)
downloadrockbox-92565e9246.tar.gz
rockbox-92565e9246.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.h2
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);
#if CONFIG_BUFLIB_BACKEND == BUFLIB_BACKEND_MEMPOOL
#include "buflib_mempool.h"
+#elif CONFIG_BUFLIB_BACKEND == BUFLIB_BACKEND_MALLOC
+#include "buflib_malloc.h"
#endif
#ifndef BUFLIB_ALLOC_OVERHEAD