Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Memory /
Chapter 3 - Virtual Memory Manager / Virtual Memory Manager Reference
Routines / Virtual Memory Management


UnholdMemory

To make a currently held range of memory eligible for paging again, use the UnholdMemory function.

FUNCTION UnholdMemory (address: UNIV Ptr; count: LongInt): OSErr;
address
The starting address of the range of memory to be released.
count
The size, in bytes, of the range of memory to be released.
DESCRIPTION
The UnholdMemory function makes the portion of the address space beginning at address and having a size of count bytes eligible for paging.

If the address parameter supplied to the UnholdMemory function 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, the count parameter is rounded up so that the entire range of memory is released.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the UnholdMemory function are
Trap macro Selector
_MemoryDispatch$0001

The registers on entry and exit for this routine are
Registers on entry
D0Selector code
A0Starting address
A1Number of bytes to release
Registers on exit
D0Result code

RESULT CODES
noErr0No error
paramErr-50Error in parameter list
notHeldErr-621Specified range of memory is not held
interruptsMaskedErr-624Called with interrupts masked

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996