comparison src/core/nginx.c @ 2049:2a92804f4109

*) back out r2040 *) refactor ngx_palloc() *) introduce ngx_pnalloc() *) additional pool blocks have smaller header
author Igor Sysoev <igor@sysoev.ru>
date Tue, 17 Jun 2008 15:00:30 +0000
parents 7018254cc006
children 01b71aa095cc
comparison
equal deleted inserted replaced
2048:824615f3b4ec 2049:2a92804f4109
824 return NGX_CONF_ERROR; 824 return NGX_CONF_ERROR;
825 } 825 }
826 826
827 ccf->oldpid.len = ccf->pid.len + sizeof(NGX_OLDPID_EXT); 827 ccf->oldpid.len = ccf->pid.len + sizeof(NGX_OLDPID_EXT);
828 828
829 ccf->oldpid.data = ngx_palloc(cycle->pool, ccf->oldpid.len); 829 ccf->oldpid.data = ngx_pnalloc(cycle->pool, ccf->oldpid.len);
830 if (ccf->oldpid.data == NULL) { 830 if (ccf->oldpid.data == NULL) {
831 return NGX_CONF_ERROR; 831 return NGX_CONF_ERROR;
832 } 832 }
833 833
834 ngx_memcpy(ngx_cpymem(ccf->oldpid.data, ccf->pid.data, ccf->pid.len), 834 ngx_memcpy(ngx_cpymem(ccf->oldpid.data, ccf->pid.data, ccf->pid.len),
868 return NGX_CONF_ERROR; 868 return NGX_CONF_ERROR;
869 } 869 }
870 870
871 } else { 871 } else {
872 cycle->lock_file.len = ccf->lock_file.len + 1; 872 cycle->lock_file.len = ccf->lock_file.len + 1;
873 cycle->lock_file.data = ngx_palloc(cycle->pool, 873 cycle->lock_file.data = ngx_pnalloc(cycle->pool,
874 ccf->lock_file.len + sizeof(".accept")); 874 ccf->lock_file.len + sizeof(".accept"));
875 if (cycle->lock_file.data == NULL) { 875 if (cycle->lock_file.data == NULL) {
876 return NGX_CONF_ERROR; 876 return NGX_CONF_ERROR;
877 } 877 }
878 878