diff options
author | Tomasz Malesinski <tomal@rockbox.org> | 2006-11-26 20:56:26 +0000 |
---|---|---|
committer | Tomasz Malesinski <tomal@rockbox.org> | 2006-11-26 20:56:26 +0000 |
commit | 0bed2be41427a2dbaa10faa7fbea198a0a5c43a8 (patch) | |
tree | 2685d669b2fad93d6bc0a89f17476d93ca49831b /apps/codecs/Tremor/os_types.h | |
parent | 0a0c3f97631f4fbc37db7890196a3bbaa910d7b7 (diff) | |
download | rockbox-0bed2be41427a2dbaa10faa7fbea198a0a5c43a8.tar.gz rockbox-0bed2be41427a2dbaa10faa7fbea198a0a5c43a8.zip |
FS#6357, patch 3: implemented simple temporary malloc for the Vorbis decoder.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11610 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/Tremor/os_types.h')
-rw-r--r-- | apps/codecs/Tremor/os_types.h | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/apps/codecs/Tremor/os_types.h b/apps/codecs/Tremor/os_types.h index 1e0cb1332f..5738ef4911 100644 --- a/apps/codecs/Tremor/os_types.h +++ b/apps/codecs/Tremor/os_types.h | |||
@@ -19,6 +19,9 @@ | |||
19 | #ifndef _OS_TYPES_H | 19 | #ifndef _OS_TYPES_H |
20 | #define _OS_TYPES_H | 20 | #define _OS_TYPES_H |
21 | 21 | ||
22 | #include <stdlib.h> | ||
23 | #include <codecs.h> | ||
24 | |||
22 | #ifdef _LOW_ACCURACY_ | 25 | #ifdef _LOW_ACCURACY_ |
23 | # define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9)) | 26 | # define X(n) (((((n)>>22)+1)>>1) - ((((n)>>22)+1)>>9)) |
24 | # define LOOKUP_T const unsigned char | 27 | # define LOOKUP_T const unsigned char |
@@ -29,10 +32,20 @@ | |||
29 | 32 | ||
30 | /* make it easy on the folks that want to compile the libs with a | 33 | /* make it easy on the folks that want to compile the libs with a |
31 | different malloc than stdlib */ | 34 | different malloc than stdlib */ |
32 | #define _ogg_malloc malloc | 35 | |
33 | #define _ogg_calloc calloc | 36 | #define _ogg_malloc ogg_malloc |
34 | #define _ogg_realloc realloc | 37 | #define _ogg_calloc ogg_calloc |
35 | #define _ogg_free free | 38 | #define _ogg_realloc ogg_realloc |
39 | #define _ogg_free(x) do { } while(0) | ||
40 | |||
41 | void ogg_malloc_init(void); | ||
42 | void *ogg_malloc(size_t size); | ||
43 | void *ogg_tmpmalloc(size_t size); | ||
44 | void *ogg_calloc(size_t nmemb, size_t size); | ||
45 | void *ogg_tmpcalloc(size_t nmemb, size_t size); | ||
46 | void *ogg_realloc(void *ptr, size_t size); | ||
47 | long ogg_tmpmalloc_pos(void); | ||
48 | void ogg_tmpmalloc_free(long pos); | ||
36 | 49 | ||
37 | typedef short ogg_int16_t; | 50 | typedef short ogg_int16_t; |
38 | typedef int ogg_int32_t; | 51 | typedef int ogg_int32_t; |