summaryrefslogtreecommitdiffstats
path: root/firmware/buflib.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-03-30 18:23:59 +0100
committerAidan MacDonald <amachronic@protonmail.com>2022-09-19 15:09:51 -0400
commit6e9b1b344b7f7b04a2ae4ace0a1d191f63d03396 (patch)
tree5ac3a016544e13a6b1cf54aa4762f53a0ebaeb5e /firmware/buflib.c
parent3090cf0da4edde67234faaeda18de91fa91aa5ef (diff)
downloadrockbox-6e9b1b344b.tar.gz
rockbox-6e9b1b344b.zip
buflib: remove buflib_print_allocs / buflib_print_blocks
These don't have any users and there is already another way to print blocks (which is actually used by the debug menu). Change-Id: Ic6a4f874c6499c42bc046e8af3e4aaddc9e68276
Diffstat (limited to 'firmware/buflib.c')
-rw-r--r--firmware/buflib.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/firmware/buflib.c b/firmware/buflib.c
index 2ed13b49b1..6bfc499235 100644
--- a/firmware/buflib.c
+++ b/firmware/buflib.c
@@ -1068,52 +1068,6 @@ void buflib_check_valid(struct buflib_context *ctx)
}
#endif
-#ifdef BUFLIB_DEBUG_BLOCKS
-void buflib_print_allocs(struct buflib_context *ctx,
- void (*print)(int, const char*))
-{
- union buflib_data *this, *end = ctx->handle_table;
- char buf[128];
- for(this = end - 1; this >= ctx->last_handle; this--)
- {
- if (!this->alloc) continue;
-
- int handle_num = end - this;
- void* alloc_start = this->alloc;
- union buflib_data *block_start = handle_to_block(ctx, handle_num);
- const char* name = buflib_get_name(ctx, handle_num);
- intptr_t alloc_len = block_start[fidx_LEN];
-
- snprintf(buf, sizeof(buf),
- "%s(%d):\t%p\n"
- " \t%p\n"
- " \t%ld\n",
- name?:"(null)", handle_num, block_start, alloc_start, alloc_len);
- /* handle_num is 1-based */
- print(handle_num - 1, buf);
- }
-}
-
-void buflib_print_blocks(struct buflib_context *ctx,
- void (*print)(int, const char*))
-{
- char buf[128];
- int i = 0;
-
- for(union buflib_data *block = ctx->buf_start;
- block != ctx->alloc_end;
- block += abs(block->val))
- {
- check_block_length(ctx, block);
-
- snprintf(buf, sizeof(buf), "%8p: val: %4ld (%s)",
- block, (long)block->val,
- block->val > 0 ? block[fidx_NAME].name : "<unallocated>");
- print(i++, buf);
- }
-}
-#endif
-
#ifdef BUFLIB_DEBUG_BLOCK_SINGLE
int buflib_get_num_blocks(struct buflib_context *ctx)
{