When a request is made, CLI allocates buffers as follows:
- CLI searches the free buffer headers for either:
- A matching size
- The next larger size
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. - 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.
- CLI updates the following fields in the selected header.
- ALOC (allocated)
- USED
- 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.