Free Memory Block

Frees a memory block that was previously allocated with
either the Allocate Memory Block function (Int 31H Function
0501H) or the Allocate Linear Memory Block function (Int 31H
Function 0504H).

Call With:

AX = 0502H
SI:DI = memory block handle

Returns:

if function successful
Carry flag= clear

if function unsuccessful
Carry flag= set
AX = error code
8023H invalid handle

Notes:

o This call will correctly free all of the possible page
types that can occur in a memory block: committed pages,
uncommitted pages, and mapped pages (see Appendix A:
Glossary).

o No descriptors are freed by this call. It is the
client's responsibility to free any descriptors that it
previously allocated to map the memory block.
Descriptors should be freed before linear memory blocks.