<p dir="ltr">Use ngx_queue_t<br>
</p>
<div class="gmail_quote">On Aug 23, 2016 09:41, "Raghavan, Gopal" <<a href="mailto:gopal.raghavan@here.com">gopal.raghavan@here.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can store as ngx_rbtree_t.<br>
Any suggestion on how to store a struct with list of items, something like this in shared memory?<br>
<br>
typedef struct {<br>
    ngx_rbtree_node_t          node;<br>
    ngx_uint_t                          id;<br>
    ngx_list_t                          *items; // list of items. But ngx_list_t is not possible since it needs ngx_pool_t. Any alternatives?<br>
} ngx_http_metadata_shm_block_t;<br>
<br>
Thanks,<br>
--<br>
Gopal<br>
<br>
On 8/23/16, 7:11 AM, "nginx-devel on behalf of Maxim Dounin" <<a href="mailto:nginx-devel-bounces@nginx.org">nginx-devel-bounces@nginx.org</a> on behalf of <a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>> wrote:<br>
<br>
>Hello!<br>
><br>
>On Tue, Aug 23, 2016 at 02:51:54AM +0000, Raghavan, Gopal wrote:<br>
><br>
>> Is it possible to use ngx_list_create and ngx_list_init with share memory?<br>
>> List functions take ngx_pool_t, however shared memory zone provides ngx_slab_pool_t.<br>
>> If yes, could you please share an example.<br>
><br>
>No, it's not possible.<br>
><br>
>--<br>
>Maxim Dounin<br>
><a href="http://nginx.org/" rel="noreferrer" target="_blank">http://nginx.org/</a><br>
><br>
>_____________________________<wbr>__________________<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" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx-devel</a><br>
<br>
______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx-devel</a><br>
</blockquote></div>