From 840cd1069292e3f29d18e57f2274ec1e979f858b Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Thu, 23 Jul 2009 21:37:35 +0000 Subject: Another pdbox patch by Wincent Balin (FS #10416): switch to using TLSF as memory allocator. Probably the last patch I commit for him, next changes are for him :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22017 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c') diff --git a/apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c b/apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c index 47b461bac5..35bdc70290 100644 --- a/apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c +++ b/apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c @@ -164,8 +164,14 @@ #define PAGE_SIZE (getpagesize()) #endif +#if defined(ROCKBOX) && defined(SIMULATOR) || !defined(ROCKBOX) +int printf(char*, ...); #define PRINT_MSG(fmt, args...) printf(fmt, ## args) #define ERROR_MSG(fmt, args...) printf(fmt, ## args) +#else +#define PRINT_MSG(fmt, args...) +#define ERROR_MSG(fmt, args...) +#endif typedef unsigned int u32_t; /* NOTE: Make sure that this type is 4 bytes long on your computer */ typedef unsigned char u8_t; /* NOTE: Make sure that this type is 1 byte on your computer */ @@ -567,6 +573,9 @@ size_t get_used_size(void *mem_pool) #if TLSF_STATISTIC return ((tlsf_t *) mem_pool)->used_size; #else +#ifdef ROCKBOX + (void) mem_pool; +#endif /* ROCKBOX */ return 0; #endif } @@ -578,6 +587,9 @@ size_t get_max_size(void *mem_pool) #if TLSF_STATISTIC return ((tlsf_t *) mem_pool)->max_size; #else +#ifdef ROCKBOX + (void) mem_pool; +#endif /* ROCKBOX */ return 0; #endif } -- cgit v1.2.3