Applications no longer use Memory Manager functions when accessing the storage heap. The Data Manager now declares those functions that you use to access the storage heap.
Note that many of the APIs provided by the Memory Manager exist to simplify the process of porting an application from an earlier version of Palm OS. Palm OS Cobalt applications can make use of the standard C memory management functions—functions such as malloc()
, realloc()
, and free()
—instead.
Some new functions have been added that allow you to interact with the dynamic heap.
Palm OS Cobalt does not support the concept of internal memory cards (a feature of early Palm Powered devices, not to be confused with expansion cards such as SD cards and Memory Sticks), so the "card number" parameter has been removed from those functions that supported it and functions that existed solely to support such memory cards are no longer supported.
NOTE: Early in the porting process you may want to
#include MemoryMgrCompatibility.h
(after the
#include
for
PalmOS.h
). This header file defines a number of APIs and macros that allow applications calling certain deleted functions and functions with modified prototypes to compile and run. This compatibility header should not be counted on long-term, however, so later in the porting process you should remove the
#include
and fix any problems that result.
Deleted APIs ^TOP^
Table 69.1 Deleted functions
Deleted API
|
Use instead
|
MemCardFormat()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemCardInfo()
|
Nothing. Internal memory cards are no longer supported.
|
MemChunkNew()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemHandleCardNo()
|
Nothing. Internal memory cards are no longer supported.
|
MemHandleFlags()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemHandleLockCount()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemHandleOwner()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemHandleResetLock()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemHeapFreeByOwnerID()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemHeapInit()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemInit()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemInitHeapTable()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemKernelInit()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemNumCards()
|
Nothing. Internal memory cards are no longer supported.
|
MemPtrCardNo()
|
Nothing. Internal memory cards are no longer supported.
|
MemPtrFlags()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemPtrOwner()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemPtrResetLock()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemSemaphoreRelease()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemSemaphoreReserve()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
MemStoreInfo()
|
Nothing. Internal memory cards are no longer supported.
|
MemStoreSetInfo()
|
Nothing. This function was documented as "System Use Only" and should not have been used by applications.
|
Table 69.2 Deleted #defines
Deleted API
|
Use instead
|
memErrNoRAMOnCard
|
Nothing. Internal memory cards are no longer supported.
|
memErrRAMOnlyCard
|
Nothing. Internal memory cards are no longer supported.
|
memErrROMOnlyCard
|
Nothing. Internal memory cards are no longer supported.
|
Modified APIs ^TOP^
Table 69.3 Modified functions
Modified API
|
Description of change
|
uint16_t MemHeapID (uint16_t)
|
The card number parameter has been removed.
|
void *MemLocalIDToGlobal (LocalID)
|
The card number parameter has been removed.
|
void *MemLocalIDToLockedPtr (LocalID)
|
The card number parameter has been removed.
|
void *MemLocalIDToPtr (LocalID)
|
The card number parameter has been removed.
|
uint16_t MemNumHeaps (void)
|
The card number parameter has been removed.
|
uint16_t MemNumRAMHeaps (void)
|
The card number parameter has been removed.
|
Unchanged APIs ^TOP^
Table 69.4 Unchanged functions
MemChunkFree()
|
MemCmp()
|
MemDebugMode()
|
MemHandleDataStorage()
|
MemHandleFree()
|
MemHandleHeapID()
|
MemHandleLock()
|
MemHandleNew()
|
MemHandleResize()
|
MemHandleSetOwner()
|
MemHandleSize()
|
MemHandleToLocalID()
|
MemHandleUnlock()
|
MemHeapCheck()
|
MemHeapCompact()
|
MemHeapDynamic()
|
MemHeapFlags()
|
MemHeapFreeBytes()
|
MemHeapScramble()
|
MemHeapSize()
|
MemLocalIDKind()
|
MemMove()
|
MemPtrDataStorage()
|
MemPtrHeapID()
|
MemPtrNew()
|
MemPtrRecoverHandle()
|
MemPtrResize()
|
MemPtrSetOwner()
|
MemPtrSize()
|
MemPtrToLocalID()
|
MemPtrUnlock()
|
MemSet()
|
MemSetDebugMode()
|
|
Table 69.5 Unchanged macros
Table 69.6 Unchanged #defines
memDebugModeAllHeaps
|
memDebugModeCheckOnAll
|
memDebugModeCheckOnChange
|
memDebugModeFillFree
|
memDebugModeRecordMinDynHeapFree
|
memDebugModeScrambleOnAll
|
memDebugModeScrambleOnChange
|
memErr...
|
memNewChunkFlagAtEnd
|
memNewChunkFlagAtStart
|
memNewChunkFlagNonMovable
|
memNewChunkFlagPreLock
|
Table 69.7 Unchanged enumerated types