ngx_list_create in shm_zone

Wandenberg Peixoto wandenberg at gmail.com
Tue Aug 23 13:15:36 UTC 2016


Use ngx_queue_t
On Aug 23, 2016 09:41, "Raghavan, Gopal" <gopal.raghavan at here.com> wrote:

> I can store as ngx_rbtree_t.
> Any suggestion on how to store a struct with list of items, something like
> this in shared memory?
>
> typedef struct {
>     ngx_rbtree_node_t          node;
>     ngx_uint_t                          id;
>     ngx_list_t                          *items; // list of items. But
> ngx_list_t is not possible since it needs ngx_pool_t. Any alternatives?
> } ngx_http_metadata_shm_block_t;
>
> Thanks,
> --
> Gopal
>
> On 8/23/16, 7:11 AM, "nginx-devel on behalf of Maxim Dounin" <
> nginx-devel-bounces at nginx.org on behalf of mdounin at mdounin.ru> wrote:
>
> >Hello!
> >
> >On Tue, Aug 23, 2016 at 02:51:54AM +0000, Raghavan, Gopal wrote:
> >
> >> Is it possible to use ngx_list_create and ngx_list_init with share
> memory?
> >> List functions take ngx_pool_t, however shared memory zone provides
> ngx_slab_pool_t.
> >> If yes, could you please share an example.
> >
> >No, it's not possible.
> >
> >--
> >Maxim Dounin
> >http://nginx.org/
> >
> >_______________________________________________
> >nginx-devel mailing list
> >nginx-devel at nginx.org
> >http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20160823/c7ebee2b/attachment.html>


More information about the nginx-devel mailing list