aboutsummaryrefslogtreecommitdiff
path: root/src/core/nginx.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-09-30 12:56:44 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-09-30 12:56:44 +0000
commit687b0e99ea4ff631e447fff2d177d0c9297529fc (patch)
tree5a82866c784ba18d911e76d696f7ebc49408e39a /src/core/nginx.c
parent689064b91adbf990d266e0e85b31d0b2d33b1515 (diff)
downloadnginx-687b0e99ea4ff631e447fff2d177d0c9297529fc.tar.gz
nginx-687b0e99ea4ff631e447fff2d177d0c9297529fc.zip
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.
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r--src/core/nginx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index ff7a9f848..eaae62e4b 100644
--- 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;