xolox/lua-apr — Issue #11: Optimize memory pool management?
Author: zhaozg
Created: 2011-11-27 11:06:26+00:00
State: open

Hello Peter.

If not in thread mode, pool works fine, but when lua-apr used in [mod_lua] for apache http://httpd.apache.org/docs/2.3/mod/mod_lua.html, it will failed.
mod_lua support a few scope, please see http://httpd.apache.org/docs/2.3/mod/mod_lua.html#luascope,

You know that apache work for windows/nt is a multi-thread mode, apr will be reloaded more times, and pool that managed by to_pool() and LUA_APR_POOL_KEY keys,

I have a temp solution, that is When lua_state vm create, I will put a pool at LUA_APR_POOL_KEY keys, that will resolve some problem, but If you makes that used sub-pool in lua apr functions, and destroy sub pool when is end, I will makes more flexible, just like lua_apr_xlate(),

If you have time, please think about support mod_lua by some better solution.

Thanks very much.