You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ka...@hydrometer.de on 2013/06/21 14:48:35 UTC
Memory cleanup / leakage
Please add me to the answer list, cause I am not subscribed.
I am using the Binary Package of Subversion library Version 1.7.9 in my
software.
Everything works fine so far but a little memory leak I detected in my
tests. I am not shure if I use everything as I should. Maybe you can help
me.
I reduced the usage of the lib to the following:
Code start:
while(true)
{
apr_initialize();
apr_pool_initialize();
apr_pool_t* m_pool = svn_pool_create(0);;
....
svn_pool_destroy(m_pool);
apr_terminate();;
}
Code end
Here is the crazy memory leak about it:
- When the pool is created the memory of the process increases of about 12
Bytes
- The memory will not be freed on svn_pool_destroy
- The memory does not increase on every svn_pool_create. It seems to do
this two times and then one time not.
Am I doing something wrong?
Best regards,
Kai
Bitte überlegen Sie, ob Sie diese Nachricht wirklich ausdrucken müssen/
before printing, think about environmental responsibility.
Hydrometer GmbH, Industriestraße 13, 91522 Ansbach
Telefon + 49 981 1806 0, Telefax +49 981 1806 615
Sitz der Gesellschaft: Ansbach, Registergericht: Ansbach HRB 69
Geschäftsführer: Frank Gutzeit (Sprecher), Dr.-Ing. Robert Westphal,
Thomas Gastner, Adam Mechel
Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese
E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail fälschlicherweise
erhalten haben. Bitte löschen Sie in diesem Fall die Nachricht. Jede
unerlaubte Form der Reproduktion, Bekanntgabe, Änderung, Verteilung
und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This
e-mail contains confidential and/or legally protected information. Please
inform us if you have received this e-mail by mistake and delete it in
such a case. Each unauthorized reproduction, disclosure, alteration,
distribution and/or publication of this e-mail is strictly prohibited.
Re: Memory cleanup / leakage
Posted by Daniel Shahaf <da...@elego.de>.
Kai-Uwe.Schieser@hydrometer.de wrote on Fri, Jun 21, 2013 at 14:48:35 +0200:
> Please add me to the answer list, cause I am not subscribed.
>
>
> I am using the Binary Package of Subversion library Version 1.7.9 in my
> software.
> Everything works fine so far but a little memory leak I detected in my
> tests. I am not shure if I use everything as I should. Maybe you can help
> me.
>
>
> I reduced the usage of the lib to the following:
>
> Code start:
>
> while(true)
> {
> apr_initialize();
> apr_pool_initialize();
> apr_pool_t* m_pool = svn_pool_create(0);;
>
> ....
>
> svn_pool_destroy(m_pool);
> apr_terminate();;
> }
>
> Code end
>
That's not an SVN problem. svn_pool_create() and svn_pool_destroy() are
aliases to the corresponding APR functions. You should talk to the APR
guys.
Daniel
> Here is the crazy memory leak about it:
> - When the pool is created the memory of the process increases of about 12
> Bytes
> - The memory will not be freed on svn_pool_destroy
> - The memory does not increase on every svn_pool_create. It seems to do
> this two times and then one time not.
>
> Am I doing something wrong?
>
>
> Best regards,
> Kai
>
>
> Bitte überlegen Sie, ob Sie diese Nachricht wirklich ausdrucken müssen/
> before printing, think about environmental responsibility.
>
> Hydrometer GmbH, Industriestraße 13, 91522 Ansbach
> Telefon + 49 981 1806 0, Telefax +49 981 1806 615
> Sitz der Gesellschaft: Ansbach, Registergericht: Ansbach HRB 69
> Geschäftsführer: Frank Gutzeit (Sprecher), Dr.-Ing. Robert Westphal,
> Thomas Gastner, Adam Mechel
>
> Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese
> E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
> Informieren Sie uns bitte, wenn Sie diese E-Mail fälschlicherweise
> erhalten haben. Bitte löschen Sie in diesem Fall die Nachricht. Jede
> unerlaubte Form der Reproduktion, Bekanntgabe, Änderung, Verteilung
> und/oder Publikation dieser E-Mail ist strengstens untersagt.
>
> The contents of the above mentioned e-mail is not legally binding. This
> e-mail contains confidential and/or legally protected information. Please
> inform us if you have received this e-mail by mistake and delete it in
> such a case. Each unauthorized reproduction, disclosure, alteration,
> distribution and/or publication of this e-mail is strictly prohibited.
>
>
Re: Memory cleanup / leakage
Posted by Branko Čibej <br...@wandisco.com>.
On 21.06.2013 15:48, Ivan Zhakov wrote:
> On Fri, Jun 21, 2013 at 4:48 PM, <Ka...@hydrometer.de> wrote:
>> Please add me to the answer list, cause I am not subscribed.
>>
>>
>> I am using the Binary Package of Subversion library Version 1.7.9 in my
>> software.
>> Everything works fine so far but a little memory leak I detected in my
>> tests. I am not shure if I use everything as I should. Maybe you can help
>> me.
>>
>>
>> I reduced the usage of the lib to the following:
>>
>> Code start:
>>
>> while(true)
>> {
>> apr_initialize();
>> apr_pool_initialize();
> AFAIK it's not allowed to call apr_initialize() more than once per process.
As a matter of fact, apr_initialize/apr_terminate maintain a counter of
the number of calls made. However, apr_pool_initialize is subsumed in
apr_initialize and shouldn't be used in the case you show above.
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com
Re: Memory cleanup / leakage
Posted by Ivan Zhakov <iv...@visualsvn.com>.
On Fri, Jun 21, 2013 at 4:48 PM, <Ka...@hydrometer.de> wrote:
> Please add me to the answer list, cause I am not subscribed.
>
>
> I am using the Binary Package of Subversion library Version 1.7.9 in my
> software.
> Everything works fine so far but a little memory leak I detected in my
> tests. I am not shure if I use everything as I should. Maybe you can help
> me.
>
>
> I reduced the usage of the lib to the following:
>
> Code start:
>
> while(true)
> {
> apr_initialize();
> apr_pool_initialize();
AFAIK it's not allowed to call apr_initialize() more than once per process.
--
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com