Welcome! Log In Create A New Profile

Advanced

Re: Life of objects allocated using the request pool?

Maxim Dounin
June 11, 2014 06:08PM
Hello!

On Wed, Jun 11, 2014 at 12:26:03PM +0530, Adarsh Pugalia wrote:

> What is the life of objects allocated using the request pool? If I allocate
> memory from the r->pool in a request handler, what would be the life of the
> object? Will the objects be freed if the request is over of will it sustain
> over multiple requests?

The request pool is destroyed with the request, and no objects
allocated from the pool can be used after this.

That's actually the whole point: allocations from a pool don't need
to be freed individually, it's enough to destroy the pool itself.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Life of objects allocated using the request pool?

Adarsh Pugalia June 11, 2014 02:58AM

Re: Life of objects allocated using the request pool?

Maxim Dounin June 11, 2014 06:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 184
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready