summaryrefslogtreecommitdiff
path: root/firmware/export/buffer.h
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2010-09-26 12:05:42 +0000
committerFrank Gevaerts <frank@gevaerts.be>2010-09-26 12:05:42 +0000
commit8ff4f1aec9f19613e4f67d2e22ae96bec7657292 (patch)
treec9e2b19b56375fac35d996fb85d5e3a5802dfc45 /firmware/export/buffer.h
parent927a7bdb4b91d3a63f014824711f796e5eb4c5ba (diff)
Add optional (define BUFFER_ALLOC_DEBUG to enable it) code to check for code overflowing buffer_alloc()-allocated buffers.
Also add a panicf() if buffer_alloc() doesn't have enough space left to allocate a requested buffer git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28173 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/buffer.h')
-rw-r--r--firmware/export/buffer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/export/buffer.h b/firmware/export/buffer.h
index f0525edd68..18f53f0000 100644
--- a/firmware/export/buffer.h
+++ b/firmware/export/buffer.h
@@ -39,4 +39,8 @@ extern unsigned char *audiobuf;
void buffer_init(void) INIT_ATTR;
void *buffer_alloc(size_t size);
+#ifdef BUFFER_ALLOC_DEBUG
+void buffer_alloc_check(char *name);
+#endif
+
#endif