Mercurial > hg > nginx
diff src/core/nginx.c @ 3177:adc4fc0c3cc3
Linux/SPARC malloc() returns an address aligned to 8. This conflicts with
our SPARC 16-byte alignment and some allocations may be done out of pool.
ngx_memalign(ngx_pagesize) fixes this issue.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 30 Sep 2009 12:56:44 +0000 |
parents | d9c46f98b09f |
children | b242aaf1dcfa |
line wrap: on
line diff
--- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -280,6 +280,9 @@ main(int argc, char *const *argv) init_cycle.log = log; ngx_cycle = &init_cycle; + /* dummy pagesize to create aligned pool */ + ngx_pagesize = 1024; + init_cycle.pool = ngx_create_pool(1024, log); if (init_cycle.pool == NULL) { return 1;