[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Possible memory leak in TSVNCache

From: Peter McNab <mcnab_p_at_melbpc.org.au>
Date: 2006-02-06 02:26:38 CET

Stefan Küng wrote:
> Peter McNab wrote:
>
>> There is something going on which very occasionally produces a higher
>> than usual TSVNCache memory usage.
>> The laptop rarely shows more than 10Mb but jumped to 97Mb about a
>> week ago. Coincidentally I simultaneously had a USB drive fail.
>> Cannot remember which nightly or rev was in use.
>
> Now that was the right hint! :)
> The cache wouldn't remove all paths recursively and didn't check if
> all cached paths still existed after loaded from disk.
>
> Fixed in revision 5624.
>
>> Maybe if the little Tortoise image which we double click to monitor
>> cache activity could include a memory usage value, perhaps truncated
>> to Mb so that it could be more actively monitored. I cannot work with
>> the Task manager continuously occupying valuable screen space.
>
> I don't think there's a way (or an easy way) to find out how much
> memory an application really uses.
> But maybe just the number of cached entries would be enough?
>
> Stefan
>

TortoiseSVN 1.4.0, Build 5629 - 32 Bit -dev & Subversion 1.3.0,
Win2K dual core CPU box.

Explore to drive with revisioned folder.
TSVNCache crawls.
Memory usage climbs as expected.
Browse back to MyComputer view.

Repeat above process to the same drive as before.
Memory usage climbs some more.

Repeat above process to the same drive as before.
Memory usage climbs some more.

Select whitespace in WC.
Press F5 .

Repeat above process to the same drive as before.
Memory usage does not climb this time.

Did some testing using a USB removable drive, marvelous thing really.

Connected drive and Windows autorun feature pops up an explorer view of
first partition.
Selecting and moving Explorer vertical scrollbar prompts TSVNCache to
crawl newly revealed folders.
In TaskManager the cache memory usage climbs a bit.
Use windows "Unplug" process and note that cache memory usage does not
decrease as indicated by TaskManager.

Repeat above process.
Memory usage climbs some more but not a lot in % terms.

Repeat above process
Memory usage climbs some more but not a lot in % terms.

Copy a WC onto the USB drive.
Memory usage climbs some more but not a lot in % terms.
Delete WC. (7000+ files, 1300+ Folders)
Memory usage indicated in TaskManager does not decrease.

Memory allocated did not rise above 19MB.
There still appears to be a small, but less threatening leak still
occurring. Sorry I cannot be more specific.

This behavior memory use behavior is similar to a problem I encountered
in Delphi, where space allocated to strings that are not set back to
empty, (deliberate leak) is not released by the memory manager while the
var remains in scope. This is the expected behavior.
However the space is re-used the next time a same sized string is
allocated to that var. You don't get two separate leaks.
Don't know if that applies to C++, it's just seems a similar sort of
behavior going is on here after deleting the WC and then re-copying it
onto the drive again.

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Feb 6 02:26:50 2006

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.