Anonymous user
Memory allocation: Difference between revisions
→{{header|360 Assembly}}
No edit summary |
|||
Line 3:
=={{header|360 Assembly}}==
Storage Requests Managed by "GETMAIN" Supervisor Call (SVC 4) ▼
<lang 360 Assembly>
SVC4 CSECT
LA 1,PLIST Point Reg 1 to SVC4 Parameter List ▼
LR 12,15
SVC 4 Issue GETMAIN SVC ▼
USING SVC4,12
LTR 15,15 Register 15 = 0? ▼
BZ GOTSTG Yes: Got Storage ▼
* [...] No: Handle GETMAIN Failure
GOTSTG L 2,STG@ Load Reg (any Reg) with Addr of Aquired Stg
* Request to Free Storage Managed by "FREEMAIN" Supervisor Call (SVC 5)
STG@ DS A Area to Receive Address of Acquired Storage ▼
STGFRE EQU * Storage Freed
* [...] Continue
*
STG@ DS A Address of Stg Area (Aquired or to be Freed)
DC A(256) Number of Bytes - Max 16777208 ((2**24)-8)
DC X'0000' (Unconditional Request; Subpool 0)
</lang>
=={{header|Ada}}==
|