Page 1 of 1
apache apr can't release memory
Posted:
25. August 2007 04:37
by liangwu2046
My apache test code is:
//////////////////////////////////////////////////////////////////////////////
apr_pool_t* pool;
if(apr_pool_create(&pool,r->pool) == APR_SUCCESS)
{
char* s = NULL;
apr_pcalloc(pool,102400000);
apr_pool_destroy(pool);
}
/////////////////////////////////////////////////////////////////////////////
my problem is: memeroy can't release after invoke apr_pool_destroy(pool), who can tell me why?
Posted:
25. August 2007 05:05
by KingCrunch
Why you think it cant? (means: error-message?!?)
I Monitor memory and found it never release
Posted:
25. August 2007 05:59
by liangwu2046
my apache is on windows platform,I debug the code and found :
after invoke apr_pool_create (), my system memory grow from 500M to 600M, so I continue debug step to apr_pool_destroy() and found that memory never free ,it is still 600M.
after invoke apr_pool_create (),apr_pcalloc(),
Posted:
25. August 2007 06:00
by liangwu2046
my apache is on windows platform,I debug the code and found :
after invoke apr_pool_create (),apr_pcalloc(), my system memory grow from 500M to 600M, so I continue debug step to apr_pool_destroy() and found that memory never free ,it is still 600M.
Re: after invoke apr_pool_create (),apr_pcalloc(),
Posted:
25. August 2007 06:34
by liangwu2046
my apache is httpd 2.2.4,the download link is
http://httpd.apache.org/download.cgi/ap ... no_ssl.msi,
my OS is windows server 2003 and my a friend OS is windows xp2, we all found this problem. We also don't know why.
Re: after invoke apr_pool_create (),apr_pcalloc(),
Posted:
25. August 2007 06:40
by liangwu2046
I tested these code on FC 6 with httpd 2.2.4 , I found the memory never release too.(use "top" to view memory's change).
why?