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 5bf914f..1cb903e 100644 --- a/apps/plugins/puzzles/rbmalloc.c +++ b/apps/plugins/puzzles/rbmalloc.c @@ -14,12 +14,9 @@ int allocs = 0; int frees = 0; -bool audiobuf_available = -#ifndef COMBINED - true; -#else - false; -#endif +/* We don't load as an overlay anymore, so the audiobuf should always + * be available. */ +bool audiobuf_available = true; static bool grab_audiobuf(void) { @@ -29,10 +26,23 @@ static bool grab_audiobuf(void) if(rb->audio_status()) rb->audio_stop(); - size_t sz, junk; + size_t sz; + void *audiobuf = rb->plugin_get_audio_buffer(&sz); extern char *giant_buffer; +#if 0 + /* Try aligning if tlsf crashes in add_new_area(). This is + * disabled now since things seem to work without it. */ + void *old = audiobuf; + + /* I'm sorry. */ + audiobuf = (void*)((int) audiobuf & ~0xff); + audiobuf += 0x100; + + sz -= audiobuf - old; +#endif + add_new_area(audiobuf, sz, giant_buffer); audiobuf_available = false; return true; |