]> git.kaiwu.me - nginx.git/commitdiff
align first allocation from additional pool block, this fixes bus error on sun4v
authorIgor Sysoev <igor@sysoev.ru>
Thu, 6 Nov 2008 16:14:24 +0000 (16:14 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 6 Nov 2008 16:14:24 +0000 (16:14 +0000)
src/core/ngx_palloc.c

index 0cadd4aed551bac875505d1449c497ba888063c7..ce826bab6cc9b91c638b03b2ba8006e54cc72058 100644 (file)
@@ -171,6 +171,7 @@ ngx_palloc_block(ngx_pool_t *pool, size_t size)
     new->d.next = NULL;
 
     m += sizeof(ngx_pool_data_t);
+    m = ngx_align_ptr(m, NGX_ALIGNMENT);
     new->d.last = m + size;
 
     current = pool->current;