Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
3176:60bc5cc68d3b | 3177:adc4fc0c3cc3 |
---|---|
278 | 278 |
279 ngx_memzero(&init_cycle, sizeof(ngx_cycle_t)); | 279 ngx_memzero(&init_cycle, sizeof(ngx_cycle_t)); |
280 init_cycle.log = log; | 280 init_cycle.log = log; |
281 ngx_cycle = &init_cycle; | 281 ngx_cycle = &init_cycle; |
282 | 282 |
283 /* dummy pagesize to create aligned pool */ | |
284 ngx_pagesize = 1024; | |
285 | |
283 init_cycle.pool = ngx_create_pool(1024, log); | 286 init_cycle.pool = ngx_create_pool(1024, log); |
284 if (init_cycle.pool == NULL) { | 287 if (init_cycle.pool == NULL) { |
285 return 1; | 288 return 1; |
286 } | 289 } |
287 | 290 |