summaryrefslogtreecommitdiff
path: root/firmware/core_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/core_alloc.c')
-rw-r--r--firmware/core_alloc.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/firmware/core_alloc.c b/firmware/core_alloc.c
index 0374c801c1..f5cc7f3189 100644
--- a/firmware/core_alloc.c
+++ b/firmware/core_alloc.c
@@ -51,7 +51,7 @@ void core_allocator_init(void)
51 51
52 buflib_init(&core_ctx, start, audiobufend - start); 52 buflib_init(&core_ctx, start, audiobufend - start);
53 53
54 test_alloc = core_alloc("test", 112); 54 test_alloc = core_alloc(112);
55} 55}
56 56
57bool core_test_free(void) 57bool core_test_free(void)
@@ -69,14 +69,14 @@ bool core_test_free(void)
69 * Note: Buffers allocated by this functions are movable. 69 * Note: Buffers allocated by this functions are movable.
70 * Don't pass them to functions that call yield() 70 * Don't pass them to functions that call yield()
71 * like disc input/output. */ 71 * like disc input/output. */
72int core_alloc(const char* name, size_t size) 72int core_alloc(size_t size)
73{ 73{
74 return buflib_alloc_ex(&core_ctx, size, name, NULL); 74 return buflib_alloc_ex(&core_ctx, size, NULL);
75} 75}
76 76
77int core_alloc_ex(const char* name, size_t size, struct buflib_callbacks *ops) 77int core_alloc_ex(size_t size, struct buflib_callbacks *ops)
78{ 78{
79 return buflib_alloc_ex(&core_ctx, size, name, ops); 79 return buflib_alloc_ex(&core_ctx, size, ops);
80} 80}
81 81
82size_t core_available(void) 82size_t core_available(void)
@@ -94,9 +94,9 @@ int core_free(int handle)
94 return buflib_free(&core_ctx, handle); 94 return buflib_free(&core_ctx, handle);
95} 95}
96 96
97int core_alloc_maximum(const char* name, size_t *size, struct buflib_callbacks *ops) 97int core_alloc_maximum(size_t *size, struct buflib_callbacks *ops)
98{ 98{
99 return buflib_alloc_maximum(&core_ctx, name, size, ops); 99 return buflib_alloc_maximum(&core_ctx, size, ops);
100} 100}
101 101
102bool core_shrink(int handle, void* new_start, size_t new_size) 102bool core_shrink(int handle, void* new_start, size_t new_size)
@@ -119,12 +119,6 @@ unsigned core_pin_count(int handle)
119 return buflib_pin_count(&core_ctx, handle); 119 return buflib_pin_count(&core_ctx, handle);
120} 120}
121 121
122const char* core_get_name(int handle)
123{
124 const char *name = buflib_get_name(&core_ctx, handle);
125 return name ?: "<anonymous>";
126}
127
128int core_get_num_blocks(void) 122int core_get_num_blocks(void)
129{ 123{
130 return buflib_get_num_blocks(&core_ctx); 124 return buflib_get_num_blocks(&core_ctx);