summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authornginx <nginx@nginx.org>2014-04-08 14:31:42 +0000
committerJon Kolb <kolbyjack@gmail.com>2014-04-08 14:31:42 +0000
commitd2ce3a1fcb5e0f7f27d22293832ced78b2cc744d (patch)
tree7bf028a91c7a083809ac298947ce157e02e884a4 /src/core
parentc6e7bb24dc541324343df6e734a44aa8e75b446f (diff)
downloadnginx-1.5.tar.gz
Changes with nginx 1.5.13 08 Apr 2014v1.5.13nginx-1.5
*) Change: improved hash table handling; the default values of the "variables_hash_max_size" and "types_hash_bucket_size" were changed to 1024 and 64 respectively. *) Feature: the ngx_http_mp4_module now supports the "end" argument. *) Feature: byte ranges support in the ngx_http_mp4_module and while saving responses to cache. *) Bugfix: alerts "ngx_slab_alloc() failed: no memory" no longer logged when using shared memory in the "ssl_session_cache" directive and in the ngx_http_limit_req_module. *) Bugfix: the "underscores_in_headers" directive did not allow underscore as a first character of a header. Thanks to Piotr Sikora. *) Bugfix: cache manager might hog CPU on exit in nginx/Windows. *) Bugfix: nginx/Windows terminated abnormally if the "ssl_session_cache" directive was used with the "shared" parameter. *) Bugfix: in the ngx_http_spdy_module.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/core/ngx_hash.c15
-rw-r--r--src/core/ngx_slab.c6
-rw-r--r--src/core/ngx_slab.h2
4 files changed, 15 insertions, 12 deletions
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 17dda595e..dc88100b9 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -9,8 +9,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 1005012
-#define NGINX_VERSION "1.5.12"
+#define nginx_version 1005013
+#define NGINX_VERSION "1.5.13"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
diff --git a/src/core/ngx_hash.c b/src/core/ngx_hash.c
index b53294502..c7bfed709 100644
--- a/src/core/ngx_hash.c
+++ b/src/core/ngx_hash.c
@@ -282,7 +282,7 @@ ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, ngx_uint_t nelts)
start = hinit->max_size - 1000;
}
- for (size = start; size < hinit->max_size; size++) {
+ for (size = start; size <= hinit->max_size; size++) {
ngx_memzero(test, size * sizeof(u_short));
@@ -312,15 +312,12 @@ ngx_hash_init(ngx_hash_init_t *hinit, ngx_hash_key_t *names, ngx_uint_t nelts)
continue;
}
- ngx_log_error(NGX_LOG_EMERG, hinit->pool->log, 0,
- "could not build the %s, you should increase "
- "either %s_max_size: %i or %s_bucket_size: %i",
+ ngx_log_error(NGX_LOG_WARN, hinit->pool->log, 0,
+ "could not build optimal %s, you should increase "
+ "either %s_max_size: %i or %s_bucket_size: %i; "
+ "ignoring %s_bucket_size",
hinit->name, hinit->name, hinit->max_size,
- hinit->name, hinit->bucket_size);
-
- ngx_free(test);
-
- return NGX_ERROR;
+ hinit->name, hinit->bucket_size, hinit->name);
found:
diff --git a/src/core/ngx_slab.c b/src/core/ngx_slab.c
index 6d18abb72..be7927ce0 100644
--- a/src/core/ngx_slab.c
+++ b/src/core/ngx_slab.c
@@ -129,6 +129,7 @@ ngx_slab_init(ngx_slab_pool_t *pool)
pool->pages->slab = pages;
}
+ pool->log_nomem = 1;
pool->log_ctx = &pool->zero;
pool->zero = '\0';
}
@@ -658,7 +659,10 @@ ngx_slab_alloc_pages(ngx_slab_pool_t *pool, ngx_uint_t pages)
}
}
- ngx_slab_error(pool, NGX_LOG_CRIT, "ngx_slab_alloc() failed: no memory");
+ if (pool->log_nomem) {
+ ngx_slab_error(pool, NGX_LOG_CRIT,
+ "ngx_slab_alloc() failed: no memory");
+ }
return NULL;
}
diff --git a/src/core/ngx_slab.h b/src/core/ngx_slab.h
index c5e420bfa..5735e3bb3 100644
--- a/src/core/ngx_slab.h
+++ b/src/core/ngx_slab.h
@@ -39,6 +39,8 @@ typedef struct {
u_char *log_ctx;
u_char zero;
+ unsigned log_nomem:1;
+
void *data;
void *addr;
} ngx_slab_pool_t;