<div dir="ltr">As far as I know, <span style="font-family:arial,sans-serif;font-size:13px">ngx_pool_t are created on process memory area, </span><div><span style="font-family:arial,sans-serif;font-size:13px">so, after a reload the new process has a new memory area and do not have access to the old.</span></div>
<div><font face="arial, sans-serif">You can recompile the regex on your module startup, at init worker hook.</font></div><div><font face="arial, sans-serif"><br></font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, May 7, 2014 at 6:16 AM, MAGNIEN, Thierry <span dir="ltr"><<a href="mailto:thierry.magnien@sfr.com" target="_blank">thierry.magnien@sfr.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I wrote a Nginx module and am facing a problem: I need to keep some data across reloads, so I'm using a shared memory segment and everything works fine except one thing.<br>
<br>
In the data structure I keep, there are ngx_regex_compile_t data, which were allocated on a ngx_pool_t. And what I see is that all the data are kept, except regex code, which was allocated on this ngx_pool_t.<br>
<br>
Are pools resetted on a reload and is there a way:<br>
- either to allocate regex codes on something else than a pool<br>
- or use a pool that would not be resetted ?<br>
<br>
Thanks for your help,<br>
Thierry<br>
<br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</blockquote></div><br></div>