(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:
tron
2005-09-08 12:48:26 +00:00
parent 0f08a1c694
commit c20b5883bd
5 changed files with 12 additions and 6 deletions

View File

@@ -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) {