1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Frank Gevaerts 2010-09-26 12:05:42 +00:00
parent 927a7bdb4b
commit 8ff4f1aec9
3 changed files with 94 additions and 3 deletions

View file

@ -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