On Sat, Feb 06, 2010 at 02:20:36PM -0500, double wrote:
Could one be sure, that “ngx_slab_max_size” is always “0”?
static ngx_uint_t ngx_slab_max_size = 0;
Here is the explication from ISO C standard (6.7.8 Initialization):
% 10. If an object that has automatic storage duration is not
% explicitly, its value is indeterminate. If an object that has static
% duration is not initialized explicitly, then:
% â€” if it has pointer type, it is initialized to a null pointer;
% â€” if it has arithmetic type, it is initialized to (positive or
% â€” if it is an aggregate, every member is initialized (recursively)
% to these rules;
% â€” if it is a union, the first named member is initialized
% according to these rules.
Guess which storage duration ngx_slab_max_size has? If in doubt,
refer to “6.2.4 Storage durations of objects” chapter of the same