[patch] ngx_array zero capacity support

Maxim Dounin mdounin at mdounin.ru
Fri Sep 11 21:05:41 MSD 2009


Hello!

On Fri, Sep 11, 2009 at 04:43:00PM +0200, Peter Schüller wrote:

> Hello,
> 
> attached is a patch to make the ngx_array_push() support zero-capacity
> arrays. Previously it would fail to grow the data buffer correctly (2
> * 0 = 0).

Could you please provide a use case where one should create array 
without elements allocated?

Current nginx coding style suggest that arrays aren't created 
until needed, and initial allocation chunk must be at least 1.

Maxim Dounin





More information about the nginx mailing list