(svn r2924) Introduce the ALIGN() macro which aligns values to multiples of a power of 2, for exact semantics see the commment in macros.h
This commit is contained in:
@@ -50,7 +50,7 @@ static void *pool_alloc(SettingsMemoryPool **pool, uint size)
|
||||
uint pos;
|
||||
SettingsMemoryPool *p = *pool;
|
||||
|
||||
size = (size + 3) & ~3; // align everything to a 32 bit boundary
|
||||
size = ALIGN(size, 4); // align everything to a 32 bit boundary
|
||||
|
||||
// first check if there's memory in the next pool
|
||||
if (p->next && p->next->pos + size <= p->next->size) {
|
||||
|
Reference in New Issue
Block a user