Texas Instruments TI-89 Developer's Manual page 135

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Chapter 9: Application Control Flow
Sometimes an application needs to be moved to another place in Flash memory.
This can happen when another application is deleted and the OS garbage
collects to free up unused Flash memory. The application receives a CM_PACK
command before garbage collect begins then CM_UNPACK after garbage collect
ends. The application's static data is reinitialized when this happens, hence the
application needs to perform much the same initialization as if it received the
CM_INSTALL message.
Alternatively, there is a four-byte location (
ACB (Application Control Block) where the app can store a value during
CM_PACK processing which can be retrieved during CM_UNPACK processing.
If the application has a lot of data to save, it can allocate memory from the heap
and store its handle in
message, it retrieves the memory handle from
data, and releases the handle. Use routines OO_appSetPublicStorage and
OO_appGetPublicStorage to save and retrieve your application's
publicstorage
Note: An application will never receive pack/unpack messages while it is active. The
The OS sends CM_UNINSTALL to an application as final notification when it is
about to be deleted. Any memory handles the application allocated when it was
installed or while it was active should be deleted at this time to prevent memory
leaks.
TI-89 / TI-92 Plus Developer Guide
publicstorage
.
application will always have been terminated (that is, received the CM_QUIT message)
before it is moved.
Not for Distribution
) in the application's
publicstorage
. When the application receives the unpack
publicstorage
Beta Version January 26, 2001
93
, reinitializes its

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents