m_free
This function shrinks the data space claimed by the application by releasing all memory beyond ptr. Applications should make sure that the value of ptr is above or equal to the first value returned by m_alloc(). m_free() tests to make sure that the offset is within the range of the currently allocated block, but it does not test to see that it is beyond the initial allocation at load time.
- Syntax: int m_free(char near *ptr)
- Parameters: char near *ptr - Pointer identifying following memory space for release
This value will be rounded to the next paragraph
boundary.
- Returns: 0 - if successful
-1 in AX - if an illegal value is detected
- Related Calls: m_free_large
- Comments: Do not call after making calls to m_get_far_block.
Memory Stack