Important: The information in this document is obsolete and should not be used for new development.
SetPtrSize
You can use theSetPtrSizeprocedure to change the logical size of the nonrelocatable block corresponding to a pointer.
PROCEDURE SetPtrSize (p: Ptr; newSize: Size);
p- A pointer to a nonrelocatable block.
newSize- The desired new logical size, in bytes, of the nonrelocatable block.
DESCRIPTION
TheSetPtrSizeprocedure attempts to change the logical size of the nonrelocatable block pointed to byp. The new logical size is specified bynewSize.An attempt to increase the size of a nonrelocatable block might fail because of a block above it that is either nonrelocatable or locked. You should be prepared for this possibility.
SPECIAL CONSIDERATIONS
BecauseSetPtrSizeallocates memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forSetPtrSizeare
Registers on entry A0 Pointer to the nonrelocatable block D0 Desired new size of nonrelocatable block
Registers on exit D0 Result code RESULT CODES
noErr 0 No error memFullErr -108 Not enough memory memWZErr -111 Attempt to operate on a free block