From 60c640b5493ffac88a23e05f1a819dff27ec2de3 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Wed, 27 Oct 2010 15:07:05 +0000 Subject: test_codec: Align the codec buffer to pointer size, since tlsf wants that. Fixes a crash when running tremor in test_codec on 64 bit sim. (The tlsf init bailed out but tremor doesn't check the return and went on to alloc memory anyway) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28365 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/test_codec.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/plugins/test_codec.c') diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c index d581d74f8e..91b83b5343 100644 --- a/apps/plugins/test_codec.c +++ b/apps/plugins/test_codec.c @@ -803,6 +803,9 @@ enum plugin_status plugin_start(const void* parameter) dspbuffer = wavbuffer + buffer_size / 2; codec_mallocbuf = rb->plugin_get_audio_buffer(&audiosize); + /* Align codec_mallocbuf to pointer size, tlsf wants that */ + codec_mallocbuf = (void*)(((intptr_t)codec_mallocbuf + + sizeof(intptr_t)-1) & ~(sizeof(intptr_t)-1)); audiobuf = SKIPBYTES(codec_mallocbuf, CODEC_SIZE); audiosize -= CODEC_SIZE; -- cgit v1.2.3