weird memory issue
weird memory issue
- Subject: weird memory issue
- From: "Martin Redington" <email@hidden>
- Date: Wed, 23 Jul 2008 02:04:31 +0100
I've posted this to Xcode-users because it relates to the diagnostic
tools, some of which (e.g. BigTop) are part of the Developer
distribution. Let me know if you think another forum might be more
productive.
I have a disk scanning app
(http://www.mildmanneredindustries.com/baseline/), which typically
uses a *lot* of memory (e.g. a couple of hundred meg for a scan, plus
100 meg for an old scan to compare against, plus more for additional
views on the data).
Naturally, I've been tracking memory usage quite closely, to make sure
that , for example, when rescanning a disk, any unnecessary memory
gets released.
After scanning the disk, the user can view their disk contents in a
number of ways, some of which require additional processors/data
structures, and hence more memory.
In one of these views, which generates say, 100MB more memory usage,
when releasing data structures to rescan, as far as I can tell, I'm
releasing the memory properly, but am getting conflicting results from
the tools (in this case, Activity Monitor/BigTop and heap).
Activity Monitor/BigTop both report that the memory consumed by this
view is still in use.
However, when I run heap, I get the following output:
Before using the memory hungry view:
Zone DefaultMallocZone_0x2ef000: Overall size: 17319KB; 86100 nodes
malloced for 8071KB (46% of capacity); largest unused:
[0x981400-6650KB]
After using the memory hungry view:
Zone DefaultMallocZone_0x2ef000: Overall size: 389170KB; 2376803 nodes
malloced for 115,828KB (29% of capacity); largest unused:
[0x2e800000-7600KB]
After releasing the memory hungry view:
Zone DefaultMallocZone_0x2ef000: Overall size: 389174KB; 192946 nodes
malloced for 13,503KB (3% of capacity); largest unused:
[0x2e800000-7600KB]
(there are other custom zones involved, but they all look good, and
the heap output relating to objects indicates that the datastructures
are properly released).
The memory which appears to have been released in the heap output is
about the right size, but AM and BigTop report this memory as still
being consumed.
Which tool should I believe?
--
http://www.mildmanneredindustries.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden