You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by eeadev dev <ee...@gmail.com> on 2017/11/27 15:25:15 UTC
[users@httpd] how to free memory allocated using apr_palloc() - C Apache module
As written in the subject, is there a way to deallocate memory which has
been allocated using apr_palloc() and what is the best practice to do that?
thank you
Re: [users@httpd] how to free memory allocated using apr_palloc() -
C Apache module
Posted by Nick Kew <ni...@apache.org>.
On Mon, 27 Nov 2017 10:34:57 -0500
Eric Covener <co...@gmail.com> wrote:
> On Mon, Nov 27, 2017 at 10:25 AM, eeadev dev <ee...@gmail.com> wrote:
> > As written in the subject, is there a way to deallocate memory
> > which has been allocated using apr_palloc() and what is the best
> > practice to do that?
> >
>
> Create a sub-pool for the allocation and clear or destroy the subpool
> (depending on whether you'll be re-using it) with the functions in
> apr_pools.h.
>
This is users@httpd. The answer that's probably right for
the questioner is that he's looking at a pool that's managed
by the server and will be cleared at the appropriate time
(most commonly at the end of a Request). So he doesn't need
to do anything.
--
Nick Kew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] how to free memory allocated using apr_palloc() - C
Apache module
Posted by Eric Covener <co...@gmail.com>.
On Mon, Nov 27, 2017 at 10:25 AM, eeadev dev <ee...@gmail.com> wrote:
> As written in the subject, is there a way to deallocate memory which has
> been allocated using apr_palloc() and what is the best practice to do that?
>
Create a sub-pool for the allocation and clear or destroy the subpool
(depending on whether you'll be re-using it) with the functions in
apr_pools.h.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org