diff options
Diffstat (limited to 'apps/plugins/puzzles/rbmalloc.c')
-rw-r--r-- | apps/plugins/puzzles/rbmalloc.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/apps/plugins/puzzles/rbmalloc.c b/apps/plugins/puzzles/rbmalloc.c index 5bf914ff87..1cb903ef4f 100644 --- a/apps/plugins/puzzles/rbmalloc.c +++ b/apps/plugins/puzzles/rbmalloc.c | |||
@@ -14,12 +14,9 @@ | |||
14 | int allocs = 0; | 14 | int allocs = 0; |
15 | int frees = 0; | 15 | int frees = 0; |
16 | 16 | ||
17 | bool audiobuf_available = | 17 | /* We don't load as an overlay anymore, so the audiobuf should always |
18 | #ifndef COMBINED | 18 | * be available. */ |
19 | true; | 19 | bool audiobuf_available = true; |
20 | #else | ||
21 | false; | ||
22 | #endif | ||
23 | 20 | ||
24 | static bool grab_audiobuf(void) | 21 | static bool grab_audiobuf(void) |
25 | { | 22 | { |
@@ -29,10 +26,23 @@ static bool grab_audiobuf(void) | |||
29 | if(rb->audio_status()) | 26 | if(rb->audio_status()) |
30 | rb->audio_stop(); | 27 | rb->audio_stop(); |
31 | 28 | ||
32 | size_t sz, junk; | 29 | size_t sz; |
30 | |||
33 | void *audiobuf = rb->plugin_get_audio_buffer(&sz); | 31 | void *audiobuf = rb->plugin_get_audio_buffer(&sz); |
34 | extern char *giant_buffer; | 32 | extern char *giant_buffer; |
35 | 33 | ||
34 | #if 0 | ||
35 | /* Try aligning if tlsf crashes in add_new_area(). This is | ||
36 | * disabled now since things seem to work without it. */ | ||
37 | void *old = audiobuf; | ||
38 | |||
39 | /* I'm sorry. */ | ||
40 | audiobuf = (void*)((int) audiobuf & ~0xff); | ||
41 | audiobuf += 0x100; | ||
42 | |||
43 | sz -= audiobuf - old; | ||
44 | #endif | ||
45 | |||
36 | add_new_area(audiobuf, sz, giant_buffer); | 46 | add_new_area(audiobuf, sz, giant_buffer); |
37 | audiobuf_available = false; | 47 | audiobuf_available = false; |
38 | return true; | 48 | return true; |