Keith Rollin wrote:
> At 9:46 AM -0700 7/16/02, Ben Combee wrote:
>
>> In article <91176@palm-dev-forum>, [EMAIL PROTECTED]
>> says...
>>
>>>
>> > In the trace file of POSE I see entries like :
>>
>>>
>>> 3173.113: Non-relocatable chunk leaked at 0x0003B65A, size = 294
>>> 3173.113: Chunk allocated by:
>>> 3173.113: __nw__FUl
>>
>> > 3173.113: <Unknown @ 0x0007CD8A>
>>
>>>
>>> How to identify the actual function name of __nw__FUl?
>>
>>
>> This is a C++ mangled name. In particular, this is referring to
>> operator new, which you can see when you disassemble New.cp from the
>> runtime library.
>>
>> This is going to be difficult to track, as the memory leak isn't
>> really from operator new, but from what called it. POSE only tracks
>> the actual function that did the allocation.
>
>
> You wanna back up and try that again, Ben? :-) Poser captures the
> entire call stack on memory allocations and prints that out, something
> that's even shown in Jayan's posting (if possibly only in elided
> form). From Poser's release notes:
>
> * Added Memory Leak detection, controlled by a new option in the
> Debugging Options dialog. On SysAppExit, the Emulator looks for
> memory leaks (much in the same way Palm OS 3.5 and later do). If it
> finds any, it writes information about the leaks (including memory
> location, memory contents, and a stack crawl of the context that
> allocated the leaked block) to a log file. In either case, the Palm
> OS-generated "you have leaks" dialog is suppressed.
>
> If Jayan were to enable Macsbug symbols, he or she would see "<Unknown
> @ 0x0007CD8A"> replaced by the name of the function calling operator
> new().
>
> -- Keith Rollin
> -- Palm OS Emulator engineer
>
I have enabled Macsbug ( Project Settings->Code generation->Enable
mcsbug) and did a complete rebuild. The trace file does not have
details of calling function.
Here is the settings (xml export)
<EXPORTEDPANEL>
<NAME>68K CodeGen</NAME>
<SETTINGLIST>
<SETTING><NAME>MWCodeGen_68K_codesize</NAME><VALUE>Smart</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_structalignment</NAME><VALUE>MC68K</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_fp_mode</NAME><VALUE>Palm_OS</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_code68020</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_profiler</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_mpwc</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_fourbyteints</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_IEEEdoubles</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_fardata</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_farvtables</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_farstrings</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_pcrelstrings</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_pcrelconstdata</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_macsbug</NAME><VALUE>New</VALUE></SETTING>
<SETTING><NAME>MWCodeGen_68K_a6frames</NAME><VALUE>1</VALUE></SETTING>
</SETTINGLIST>
</EXPORTEDPANEL
May be I should use the inlined version of ' new' and debug, as Ben
explained.
regards
Jayan
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/