Important: The information in this document is obsolete and should not be used for new development.
HLockHi
You can use theHLockHi
procedure to move a relocatable block to the top of the heap and lock it.
PROCEDURE HLockHi (h: Handle);
h
- A handle to a relocatable block.
DESCRIPTION
TheHLockHi
procedure attempts to move the relocatable block referenced by the handleh
upward until it reaches a nonrelocatable block, a locked relocatable block, or the top of the heap. ThenHLockHi
locks the block.The
HLockHi
procedure is simply a convenient replacement for the pair of proceduresMoveHHi
andHLock
.SPECIAL CONSIDERATIONS
Because theHLockHi
procedure moves memory, you should not call it at interrupt time.Don't call
HLockHi
on blocks in the system heap. Don't callHLockHi
from a desk accessory.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forHLockHi
are
Registers on entry A0 Handle to move and lock
Registers on exit D0 Result code RESULT CODES
noErr 0 No error nilHandleErr -109 NIL
master pointermemWZErr -111 Attempt to operate on a free block memLockedErr -117 Block is locked