Bug 51256 - Memory consumption by parent process at sort_hook function
Summary: Memory consumption by parent process at sort_hook function
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.2.17
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2011-05-24 10:59 UTC by horowity@checkpoint.com
Modified: 2011-05-24 13:53 UTC (History)
0 users



Attachments
destroy the pool after usage (311 bytes, patch)
2011-05-24 13:32 UTC, horowity@checkpoint.com
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description horowity@checkpoint.com 2011-05-24 10:59:04 UTC
I have noticed that sort_hook function don't destroy temporary pool.

This leads to a memory consumption of ~500K (=68 hooks * 8K) per PROCESS!

The resolution is very simple - destroy this pool after usage (before returning the sorted hooks array).

Since the sorted hooks are memcpy'ed to another pool anyway, no one need this pool.
Comment 1 horowity@checkpoint.com 2011-05-24 13:32:43 UTC
Created attachment 27052 [details]
destroy the pool after usage
Comment 2 Issac Goldstand 2011-05-24 13:53:31 UTC
committed in r1127053

Thanks!