Opened 5 years ago

Closed 5 years ago

#1779 closed defect (duplicate)

ngx_reset_pool() function make (sizeof(ngx_pool_t) - sizeof(ngx_pool_data_t) ) bytes memory unavailable

Reported by: xbguo@… Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.15.x
Keywords: memory Cc:
uname -a: Linux localhost.localdomain 4.5.5-300.fc24.x86_64 #1 SMP Thu May 19 13:05:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.15.11

Description

In the function ngx_reset_pool (), "p->d.last = (u_char *) p + sizeof(ngx_pool_t);" preserve sizeof(ngx_pool_t) bytes,but this only necessary for first block that contain the pool structure itself.
in the ngx_palloc_block() function "m += sizeof(ngx_pool_data_t); " preserve only
sizeof(ngx_pool_data_t) bytes.

Change History (1)

comment:1 by Maxim Dounin, 5 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #1594.

Note: See TracTickets for help on using tickets.