@wandemberg said that nginx have a pool that is destroyed after the request is terminated. It's better to use nginx's malloc/free to take advantage of this functionality
First thing to notice is Nginx's memory allocation; it takes care of the free'ing as long as the module uses ngx_palloc (a malloc wrapper) or ngx_pcalloc (a calloc wrapper).
@wandemberg said that nginx have a pool that is destroyed after the request is terminated. It's better to use nginx's malloc/free to take advantage of this functionality