When a request is made, CLI allocates buffers as follows:
1 CLI searches the free buffer headers for either:
WHEN the requested buffer header size . . . |
THEN the buffer is . . . |
matches the requested size |
allocated. |
is larger than the largest buffer header available |
obtained dynamically. |
2 As each header is selected, the request size is changed to match the size of the selected header.
WHEN the allocated size . . . |
THEN . . . |
matches the request size |
no change is made. |
is greater than the request size |
the request size is changed to the size of the selected header. Each time the allocated size is greater than the request size, a record is made of the over-allocation in the selected header. |
3 CLI updates the following fields in the selected header.
4 CLI determines if there is an available buffer on the free chain.
WHEN there is . . . |
THEN the CLI . . . |
an available buffer |
decrements the field #FRE (free). |
no buffer available |
increments the field GETM (getmain) in the header and then dynamically obtains a buffer. For the actual DBC Memory Display (called DBCMAPM), see “Controlling Memory” on page 32. |