summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c')
-rw-r--r--apps/plugins/pdbox/TLSF-2.4.4/src/tlsf.c12
1 files changed, 12 insertions, 0 deletions
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 @@
164#define PAGE_SIZE (getpagesize()) 164#define PAGE_SIZE (getpagesize())
165#endif 165#endif
166 166
167#if defined(ROCKBOX) && defined(SIMULATOR) || !defined(ROCKBOX)
168int printf(char*, ...);
167#define PRINT_MSG(fmt, args...) printf(fmt, ## args) 169#define PRINT_MSG(fmt, args...) printf(fmt, ## args)
168#define ERROR_MSG(fmt, args...) printf(fmt, ## args) 170#define ERROR_MSG(fmt, args...) printf(fmt, ## args)
171#else
172#define PRINT_MSG(fmt, args...)
173#define ERROR_MSG(fmt, args...)
174#endif
169 175
170typedef unsigned int u32_t; /* NOTE: Make sure that this type is 4 bytes long on your computer */ 176typedef unsigned int u32_t; /* NOTE: Make sure that this type is 4 bytes long on your computer */
171typedef unsigned char u8_t; /* NOTE: Make sure that this type is 1 byte on your computer */ 177typedef 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)
567#if TLSF_STATISTIC 573#if TLSF_STATISTIC
568 return ((tlsf_t *) mem_pool)->used_size; 574 return ((tlsf_t *) mem_pool)->used_size;
569#else 575#else
576#ifdef ROCKBOX
577 (void) mem_pool;
578#endif /* ROCKBOX */
570 return 0; 579 return 0;
571#endif 580#endif
572} 581}
@@ -578,6 +587,9 @@ size_t get_max_size(void *mem_pool)
578#if TLSF_STATISTIC 587#if TLSF_STATISTIC
579 return ((tlsf_t *) mem_pool)->max_size; 588 return ((tlsf_t *) mem_pool)->max_size;
580#else 589#else
590#ifdef ROCKBOX
591 (void) mem_pool;
592#endif /* ROCKBOX */
581 return 0; 593 return 0;
582#endif 594#endif
583} 595}