C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
_dos_freemem
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The _dos_freemem function uses system call 0x49 to release a
     block of memory previously allocated by _dos_allocmem. The <seg>
     argument is a value returned by a previous _dos_allocmem call. The
     freed memory can no longer be used by the application program.
 
     Return Value
 
     If successful, _dos_freemem returns 0. Otherwise, it returns the
     DOS error code and sets errno to ENOMEM, indicating a bad segment
     value (one that does not correspond to a segment returned by a
     previous _dos_allocmem call) or invalid arena headers.
                                    -♦-