Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- DOS 5.0 Ref. - <b>function 49h free allocated memory</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 49h            Free Allocated Memory

    Frees a block of memory previously allocated by function 48h.

        Entry   AH = 49h
                ES = Segment address of memory to free

        Return  Nothing
                or
                AX = Error code, if CF is set
                     | 07h Memory control blocks destroyed
                     | 09h Invalid memory block address

    ------------------------------------------------------------------

    This function returns to DOS the memory that was allocated by
    means of Allocate Memory (function 48h). ES specifies the segment
    address of the block that is being returned; this is the same
    value that function 48h returned in AX.

    DOS returns an error value of 9 (invalid memory block address) if
    a program tries to free memory that was not allocated by function
    48h.

    ------------------------------------------------------------------

    Note
    DOS 2.1+ does not coalesce adjacent free blocks when a block is
    freed, only when a block is allocated or resized.

See Also: 48h 4ah 59h

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson