(svn r2976) -Fix: Align settings pool items to the size of void* to fix bus errors on 64bit architectures which require aligned variables

This commit is contained in:
tron 2005-09-23 14:21:39 +00:00
parent 7ee0b8ac86
commit 35ce780bb6

View File

@ -50,7 +50,7 @@ static void *pool_alloc(SettingsMemoryPool **pool, uint size)
uint pos; uint pos;
SettingsMemoryPool *p = *pool; SettingsMemoryPool *p = *pool;
size = ALIGN(size, 4); // align everything to a 32 bit boundary size = ALIGN(size, sizeof(void*));
// first check if there's memory in the next pool // first check if there's memory in the next pool
if (p->next && p->next->pos + size <= p->next->size) { if (p->next && p->next->pos + size <= p->next->size) {