free the last allocation in a pool

Denis F. Latypoff latypoff at yandex.ru
Tue May 4 15:40:34 MSD 2010


04.05.10, 14:19, "Peter Leonov" <gojpeg at gmail.com>:

> 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?

http://forum.nginx.org/read.php?21,44274,44299

>  
>  Thanks,
>  Peter.

-- 
br, Denis F. Latypoff.



More information about the nginx-devel mailing list