ngx_list_free

Maxim Dounin mdounin at mdounin.ru
Tue Apr 18 18:43:20 UTC 2023


Hello!

On Tue, Apr 18, 2023 at 03:12:08PM +0000, Yuval Abadi via nginx wrote:

> Thanks
> 
> I just need  list   not queue,

Queue is a double-linked list.

> And I want to free the whole list , not one node.

In nginx, memory allocations use pools, and in most cases you 
cannot free individual allocations.  The only options is to 
destroy the whole pool.

For example, this naturally works with requests: all allocations 
related to a request are done from the request pool, and are 
automatically freed when the request is freed and its pool is 
destroyed.

See here for more details about memory pools:

http://nginx.org/en/docs/dev/development_guide.html#pool

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list