Changeset - r2450:cff286bc42f2
[Not reviewed]
master
0 1 0
tron - 19 years ago 2005-09-23 14:21:39
tron@openttd.org
(svn r2976) -Fix: Align settings pool items to the size of void* to fix bus errors on 64bit architectures which require aligned variables
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
settings.c
Show inline comments
 
@@ -50,7 +50,7 @@ static void *pool_alloc(SettingsMemoryPo
 
	uint pos;
 
	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
 
	if (p->next && p->next->pos + size <= p->next->size) {
0 comments (0 inline, 0 general)