Important: The information in this document is obsolete and should not be used for new development.
DebuggerLockMemory
To lock a portion of the address space (as theLockMemoryfunction does) while leaving data caching enabled on the affected pages, use theDebuggerLockMemoryfunction.
FUNCTION DebuggerLockMemory (address: UNIV Ptr; count: LongInt): OSErr;
address- The start address of the range of memory that is to be locked in RAM.
count- The size in bytes of the range of memory that is to be locked in RAM.
DESCRIPTION
TheDebuggerLockMemoryfunction makes the portion of the address space beginning ataddressand having a size ofcountbytes immovable in physical memory and ineligible for paging. The function leaves data caching enabled on the affected pages.If the
addressparameter supplied to theDebuggerLockMemoryfunction is not on a page boundary, then it is rounded down to the nearest page boundary. Similarly, if the specified range does not end on a page boundary, thecountparameter is rounded up so that the entire range of memory is locked.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theDebuggerLockMemoryfunction are
Trap macro Selector _DebuggerLockMemory $0006 The registers on entry and exit for this routine are
Registers on entry D0 Selector code A0 Starting address A1 Number of bytes to hold
Registers on exit D0 Result code RESULT CODES
noErr 0 No error paramErr -50 Error in parameter list notEnoughMemoryErr -620 Insufficient physical memory