Welcome! Log In Create A New Profile

Advanced

Re: Modules behaving differently on 32-bit and 64-bit systems?

October 21, 2013 10:35PM
Maxim Dounin Wrote:
-------------------------------------------------------

> Quick looks suggests that the problem in xtoken module is likely
> here:
>
> https://code.google.com/p/nginx-xtoken-module/source/browse/trunk/ngx_
> http_xtoken_module.c#660
>
> It tries to estimate size of shared memory zone needed to keep
> it's data, but the estimate likely fails on 64-bit platforms due
> to internal structures of slab allocator being bigger on these
> platforms.

Thanks for the tip, Maxim. On line 13 of ngx_http_token_module.c I replaced:

#define XTOKEN_SHM_SIZE (sizeof(ngx_http_xtoken_shctx_t))

with:

#define XTOKEN_SHM_SIZE 65536

and rebuilt. It seems to work fine now.

65536 is purely arbitrary, and obviously not the most efficient use of memory. I'll do some reading and see if I can rework that memory allocation line.

Thanks,

Andrew
Subject Author Posted

Modules behaving differently on 32-bit and 64-bit systems?

andrewc October 21, 2013 01:13AM

Re: Modules behaving differently on 32-bit and 64-bit systems?

Maxim Dounin October 21, 2013 07:16AM

Re: Modules behaving differently on 32-bit and 64-bit systems?

andrewc October 21, 2013 10:35PM

Re: Modules behaving differently on 32-bit and 64-bit systems?

danielf May 26, 2014 03:39AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 126
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready