comparison src/core/ngx_crc32.c @ 270:6eb1e38f0f1f NGINX_0_5_5

nginx 0.5.5 *) Change: the -v switch does not show compiler information any more. *) Feature: the -V switch. *) Feature: the "worker_rlimit_core" directive supports size in K, M, and G. *) Bugfix: the nginx.pm module now could be installed by an unprivileged user. *) Bugfix: a segmentation fault might occur if the $r->request_body or $r->request_body_file methods were used. *) Bugfix: the ppc platform specific bugs.
author Igor Sysoev <http://sysoev.ru>
date Sun, 24 Dec 2006 00:00:00 +0300
parents fbf2b2f66c9f
children 052a7b1d40e5
comparison
equal deleted inserted replaced
269:aa9c0062124d 270:6eb1e38f0f1f
100 100
101 uint32_t *ngx_crc32_table_short = ngx_crc32_table16; 101 uint32_t *ngx_crc32_table_short = ngx_crc32_table16;
102 102
103 103
104 ngx_int_t 104 ngx_int_t
105 ngx_crc32_init(ngx_pool_t *pool) 105 ngx_crc32_init(void)
106 { 106 {
107 void *p; 107 void *p;
108 108
109 if (((uintptr_t) ngx_crc32_table_short 109 if (((uintptr_t) ngx_crc32_table_short
110 & ~((uintptr_t) ngx_cacheline_size - 1)) 110 & ~((uintptr_t) ngx_cacheline_size - 1))
111 == (uintptr_t) ngx_crc32_table_short) 111 == (uintptr_t) ngx_crc32_table_short)
112 { 112 {
113 return NGX_OK; 113 return NGX_OK;
114 } 114 }
115 115
116 p = ngx_palloc(pool, 16 * sizeof(uint32_t) + ngx_cacheline_size); 116 p = ngx_alloc(16 * sizeof(uint32_t) + ngx_cacheline_size, ngx_cycle->log);
117 if (p == NULL) { 117 if (p == NULL) {
118 return NGX_ERROR; 118 return NGX_ERROR;
119 } 119 }
120 120
121 p = ngx_align_ptr(p, ngx_cacheline_size); 121 p = ngx_align_ptr(p, ngx_cacheline_size);