Download Host Interface (HIF) Specification

Transcript
Service 258 – sysfree
Free Memory Space
Description
This service returns memory to the system starting at the address specified in
lr2. lr3 contains the number of bytes to be released. The pointer passed to the
sysfree service in lr2 and the byte count passed in lr3 must match the address
returned by a previous sysalloc service request for the identical number of
bytes. No dynamic memory allocation structure is implied by this service.
High-level language library functions such as malloc() and free() for the C
language are required to manage random dynamic memory block allocation
and deallocation, using the sysalloc and sysfree kernel functions as their basis.
Register Usage
Type
Regs
Contents
Description
Calling:
gr121
258 (0x102)
Service number
lr2
addrptr
Starting address of area returned
lr3
nbytes
Number of bytes to release
gr96
retval
Success: = 0
Failure: <0
gr121
0x80000000
errcode
Logical TRUE, service successful
Error number, service not successful
(implementation dependent)
Returns:
3–46
Host Interface (HIF) Specification
70