FROM : John Stiles
DATE : Wed Mar 12 22:23:03 2008
I haven't used Tiger's ObjectAlloc in a while but I am pretty sure you
can get stack crawls. If not, MallocDebug definitely supports this.
Instruments can do stack crawls as well.
Daniel Child wrote:
> I see your point now. Thanks. Putting in the pool enabled the
> application to complete parsing of the raw data. Unfortunately, the
> program now stops several minutes into the sorting operation (the
> large table has to be sorted). I'll look for a spot to place an
> autorelease pool, though I don't believe there is an obvious internal
> loop in this case.
>
> Incidentally, I tried running ObjectAlloc and noticed that there was
> one general block that kept growing (no doubt, the table as records
> were being added). Is there a way to figure out exactly which specific
> points of code the various blocks refer to. (Sorry if that is a newbie
> question. Performance tools are totally new territory for me.)
>
> On Mar 12, 2008, at 1:47 PM, John Stiles wrote:
>
>> Daniel Child wrote:
>>
>>> Each record is allocated and explicitly released at the end of the
>>> loop after adding it to the table. I thought autorelease might wait
>>> too long to get rid of it, so I do it explicitly.
>>>
>> Just because you never autorelease it in your code, doesn't mean that
>> it is never autoreleased. The system could be doing all sorts of
>> things that you don't know about. You should still wrap your loop in
>> an autorelease pool.
>>
>>> As for Instruments, unfortunately I'm doing this on Tiger.
>>>
>> ObjectAlloc is the Tiger equivalent.
>>
>
DATE : Wed Mar 12 22:23:03 2008
I haven't used Tiger's ObjectAlloc in a while but I am pretty sure you
can get stack crawls. If not, MallocDebug definitely supports this.
Instruments can do stack crawls as well.
Daniel Child wrote:
> I see your point now. Thanks. Putting in the pool enabled the
> application to complete parsing of the raw data. Unfortunately, the
> program now stops several minutes into the sorting operation (the
> large table has to be sorted). I'll look for a spot to place an
> autorelease pool, though I don't believe there is an obvious internal
> loop in this case.
>
> Incidentally, I tried running ObjectAlloc and noticed that there was
> one general block that kept growing (no doubt, the table as records
> were being added). Is there a way to figure out exactly which specific
> points of code the various blocks refer to. (Sorry if that is a newbie
> question. Performance tools are totally new territory for me.)
>
> On Mar 12, 2008, at 1:47 PM, John Stiles wrote:
>
>> Daniel Child wrote:
>>
>>> Each record is allocated and explicitly released at the end of the
>>> loop after adding it to the table. I thought autorelease might wait
>>> too long to get rid of it, so I do it explicitly.
>>>
>> Just because you never autorelease it in your code, doesn't mean that
>> it is never autoreleased. The system could be doing all sorts of
>> things that you don't know about. You should still wrap your loop in
>> an autorelease pool.
>>
>>> As for Instruments, unfortunately I'm doing this on Tiger.
>>>
>> ObjectAlloc is the Tiger equivalent.
>>
>
| Related mails | Author | Date |
|---|---|---|
| Daniel Child | Mar 12, 14:34 | |
| Matt Gough | Mar 12, 14:52 | |
| Thomas Engelmeier | Mar 12, 16:27 | |
| John Stiles | Mar 12, 16:57 | |
| Daniel Child | Mar 12, 18:31 | |
| Daniel Child | Mar 12, 21:18 | |
| John Stiles | Mar 12, 22:23 |






Cocoa mail archive

