Folks,

Introduced with Palm OS Emulator 3.4 were two features that you might 
find interesting.  I'm learning that developers are still discovering 
these features, and that when they do, they're totally blown away! 
Some have said that these features need more advertising, so I 
thought I'd post a description of them here.

The first feature is Memory Leak Detection.  As your application 
makes calls to MemHandleNew, MemHandleFree, MemPtrNew, MemPtrFree, 
etc., Poser takes notes on the chunks that are allocated and 
de-allocated by your application.  If, when your application quits, 
there are still some blocks allocated that you haven't freed up, 
Poser considers those "memory leaks" and will warn you about them. 
It will also generate a report containing information about the 
leaked blocks, including block location, block contents, and the name 
of the function in your application that allocated the block (as well 
as all the functions that led to that function being called, so that 
you can get a sense of the context in which that block was allocated).

The second feature is Event Minimization.  This feature is usually 
used in conjunction with Gremlins.  As of version 3.4, while running 
Gremlins, Poser records to a file all of the events that get 
generated.  If an error occurs during the Gremlin, all of the events 
that lead to that error can be found in a file in the folder created 
by Gremlins.  If you wanted, you could use Poser's new "Replay" menu 
item to replay those exact same events.  But if there are thousands 
of events in the file, that could take a long time.  Instead, you 
would use the "Minimize" menu item on the saved event file.  Minimize 
kicks off a process of examining the events file, discarding any that 
don't appear relevant to causing a crash.  You can read the details 
in the release notes, but the short of it is that you generally end 
up with an event file of only a handful of events.  As a final touch, 
Poser converts the events in the file into English form, leaving you 
with a text file with instructions ("tap here", "type this", etc.) 
that will cause your application to crash.

So, there you are!  I hope you find these features useful!

-- Keith Rollin
-- Palm OS Emulator engineer

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to