free the last allocation in a pool

Peter Leonov gojpeg at gmail.com
Tue May 4 14:19:58 MSD 2010


Hi, again,

When a module needs some memory just for a temporary buffer, it comes to this:
  buf = ngx_pnalloc(pool, len);

When the work is done, it is good to free the memory ;)
As far as ngx_pfree() tries to free the “large” blocks only it can't be used for a small allocation.
Could you please tell me, is there a way to free the last small block of memory?

Thanks,
Peter.


More information about the nginx-devel mailing list