apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From proforg <prof...@maloletka.ru>
Subject apr_memcache memory leak
Date Wed, 31 Jan 2007 01:30:03 GMT
Hi !
It looks like there is something wrong with apr_memcache memory  
I've found similar bug report at http://issues.outoforder.cc/view.php? 

Actually it looks like  conn->bb brigade does not return all memory  
to pool on apr_brigade_destroy in memcache_getp (may be I'm wrong)

As for me I've solved this problem by creating new conn->bb brigade  
on each getp request using the pool passed to getp.

     apr_bucket_alloc_t *balloc = apr_bucket_alloc_create(p);
     conn->bb = apr_brigade_create(p, balloc);
     APR_BRIGADE_INSERT_TAIL(conn->bb, apr_bucket_socket_create(conn- 
 >sock, balloc));

as this pool is cleaned on each turn, but this is ugly and does not  
solve problem in general case.

Alexej Besciokov
Email/JID: proforg@maloletka.ru

View raw message