Opened 11 years ago
Closed 11 years ago
#490 closed defect (fixed)
ngx_reset_pool() memory wastage
Reported by: | Ravi Chunduru | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | nginx-core | Version: | |
Keywords: | Cc: | ||
uname -a: | |||
nginx -V: | all versions |
Description
ngx_reset_pool() seems to free up large buffers and sets d.last to start of available memory location.
for (p = pool; p; p = p->d.next) {
p->d.last = (u_char *) p + sizeof(ngx_pool_t);
}
But it does not reset p->d.failed to zero and does not set p->d.current= pool for the first memory block.
Now that p->d.current points to the latest memory block in the pool, all the previous memory blocks in the pool go wasted.
Note:
See TracTickets
for help on using tickets.
In 320abeb364e697f86d080616de07ad09080aaea9/nginx: