From f5ec0fa592f9e23625de38673d22c4c7ee0fdfad Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Sun, 18 Sep 2005 12:44:27 +0000 Subject: iriver: fix problem with playing some long vorbis files (e.g., this week in tech, #21); the decoder would run out of memory and freeze rockbox. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7526 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/codec.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps/codecs/codec.h') diff --git a/apps/codecs/codec.h b/apps/codecs/codec.h index 0da653c..f954d1b 100644 --- a/apps/codecs/codec.h +++ b/apps/codecs/codec.h @@ -29,16 +29,21 @@ * be implemented elsewhere */ #define malloc(x) codec_malloc(x) #define calloc(x,y) codec_calloc(x,y) -#define alloca(x) codec_alloca(x) #define realloc(x,y) codec_realloc(x,y) #define free(x) codec_free(x) void* codec_malloc(size_t size); void* codec_calloc(size_t nmemb, size_t size); -void* codec_alloca(size_t size); void* codec_realloc(void* ptr, size_t size); void codec_free(void* ptr); +#if !defined(SIMULATOR) +#define alloca __builtin_alloca +#else +#define alloca(x) codec_alloca(x) +void* codec_alloca(size_t size); +#endif + #define abs(x) ((x)>0?(x):-(x)) #define labs(x) abs(x) -- cgit v1.1