Memory Mgr
Initialize
InitApplZone Setup the application heap; discard all blocks
GetApplLimit Obtain current application heap limit
SetApplLimit Change the size of the application heap zone
SetApplBase Set base address of application heap and initialize
MoreMasters Create an additional block of master pointers
MaxApplZone Expand application heap to largest possible value
Allocate/Dispose Handles
NewHandle Allocate relocatable block from current heap zone
NewEmptyHandle Create a NIL handle (don't allocate any space)
NewEmptyHandleSys Create a NIL handle in the sytem heap
DisposHandle Free allocation created via NewHandle
EmptyHandle Purge a particular relocatable block
GetHandleSize Get size of a Handle's data area
SetHandleSize Shrink or expand a relocatable memory block
ReallocHandle Reallocate storage for a purged memory block
RecoverHandle Obtain handle from a pointer to a relocatable block
NewHandleClear Allocate cleared relocatable block from current heap zone
NewHandleSys Allocate relocatable block from system heap zone
NewHandleSysClear Allocate cleared relocatable block from system heap zone
Temporary Memory
MFFreeMem total free memory available for temporary allocation
MFMaxMem Get maximum contiguous bytes after compaction and
purging of heap
MFTempNewHandle allocate new relocatable block in MultiFinder heap
MFTopMem get address of top of application's memory partition
MFTempDisposHandle release temporary memory
MFTempHLock lock a handle in MultiFinder heap zone
MFTempHUnLock unlock a handle in the MultiFinder heap zone
Handle Properties
HLock Lock a handle's data area (keep it from moving)
HUnlock Unlock a handle's data (allowing it to be moved)
HPurge Make a relocatable block purgeable
HNoPurge Disallow purging of relocatable data block
HGetState Obtain the value of a relocatable block's tag byte
HSetState Restore the value of a relocatable block's tag byte
HSetRBit Tag block for treatment as a resource
HClrRBit Clear relocatable block's resource tag
Ptrs
NewPtr Allocate a nonrelocatable block of memory
DisposPtr Release nonrelocatable memory block
GetPtrSize Obtain the size of a nonrelocatable memory block
SetPtrSize Shrink or expand a nonrelocatable memory block
NewPtrClear Allocate an cleared nonrelocatable block of memory
NewPtrSys Allocate a nonrelocatable block of memory in the system
heap
NewPtrSysClear Allocate an empty nonrelocatable block of memory on the
system heap
Heap Maintenance
FreeMem Get amount of free space in current heap zone
PurgeSpace Check free space after a purge (without purging)
MaxBlock Get size of largest free block (without compacting)
MaxBlockSys Get size of largest free block in system heap
PurgeMem Purge blocks without compacting the heap
CompactMem Compact heap until a specified block is available
CompactMemSys Compact system heap until a specified block is available
MaxMem Compact heap; return free space and max growth
MaxMemSys Compact system heap; return free space and max growth
ResrvMem Compact heap to create free space low in heap
Zones
InitZone Create a new heap zone
SetGrowZone Install custom heap zone growing procedure
GZSaveHnd Get handle to data to not move during zone growth
GetZone Get address of the current heap zone
SetZone Select a different heap zone as the 'current zone'
ApplicZone Get address of the start of application heap zone
SystemZone Get address of the start of the system heap zone
PtrZone Find which heap zone owns a nonrelocatable block
HandleZone Find which heap zone owns relocatable block
Setting and Restoring the A5 World
SetA5 Set the current value of A5.
SetCurrentA5 Get the current value of A5.
Manipulating Memory Addresses
StripAddress Strip the high order byte off an address in 24 bit mode
Translate24To32 Translate 24-bit to 32-bit address space.
Virtual Memory
HoldMemory Make part of the address space resident in memory
UnholdMemory Make part of the address space eligible for paging
LockMemory Make part of the address space immovable
LockMemoryContiguous Make a contiguous address space block immovable
UnlockMemory Make a block of the address space movable
GetPhysical Translate logical addresses to physical ones
DeferUserFn Can code that might cause page faults be called safely?
DebuggerGetMax Get the highest function number supported
PageFaultFatal Capture all bus errors?
DebuggerLockMemory Make part of the address space immovable
DebuggerUnlockMemory Make part ot address space movable
DebuggerEnter Enter the debugger state
DebuggerExit Exit the debugger state
DebuggerPoll Poll for keyboard input
GetPageState Get the state of a page of logical memory
EnterSupervisorMode Switch caller into supervisor mode
Temporary Memory Routines
TempFreeMem Find out howmuch temporary memory is available
TempMaxMem Find the largest contiguous block available
TempNewHandle Allocate a new relocatable block of temporary memory
TempHLock Lock a specified relocatable block of temporary memory
TempHUnlock Unlock a block of temporary memory
TempDisposeHandle Release the memory occupied by a temporary block
Temporary Memory Routines
FlushDataCache Flush the data cache
FlushInstructionCache Flush the instruction cache
SwapDataCache Enable or disable the data cache
SwapInstructionCache Enable or disable the instruction cache
Miscellaneous
MemError Return error code of last Memory Manager function
TopMem Get address of end of RAM
StackSpace Obtain amount of unused space in the stack
BlockMove Copy memory from one place to another
MoveHHi Move a relocatable block as high as possible
HLockHi Move a block as high as possible and lock it
OS Utilities Additional memory block tools