forked from len0rd/rockbox
Add a simple perl script to display info about what is allocating skin buffer.
To use it enable DEBUG_SKIN_ALLOCATIONS in skin_buffer.h and pipe the rockboxui output to the script git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30597 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d7372533d0
commit
7e44438936
3 changed files with 50 additions and 0 deletions
|
|
@ -27,7 +27,18 @@
|
|||
#define _SKIN_BUFFFER_H_
|
||||
void skin_buffer_init(char* buffer, size_t size);
|
||||
/* Allocate size bytes from the buffer */
|
||||
|
||||
/* #define DEBUG_SKIN_ALLOCATIONS */
|
||||
|
||||
#ifdef DEBUG_SKIN_ALLOCATIONS
|
||||
#define FOO(X) #X
|
||||
#define STRNG(X) FOO(X)
|
||||
#define skin_buffer_alloc(s) skin_buffer_alloc_ex(s, __FILE__ ":" STRNG(__LINE__))
|
||||
void* skin_buffer_alloc_ex(size_t size, char* str);
|
||||
#else
|
||||
void* skin_buffer_alloc(size_t size);
|
||||
#endif
|
||||
|
||||
|
||||
/* get the number of bytes currently being used */
|
||||
size_t skin_buffer_usage(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue