函数名: freemem
功 能: 释放先前分配的DOS内存块
用 法: #include <alloc.h>
int freemem(unsigned seg);
程序例:
#include <dos.h>
#include <alloc.h>
#include <stdio.h>
int main(void)
{
unsigned int size, segp;
int stat;
size = 64; /* (64 x 16) = 1024 bytes */
stat = allocmem(size, &segp);
if (stat < 0)
printf("Allocated memory at segment:\
%x\n", segp);
else
printf("Failed: maximum number of\
paragraphs available is %u\n",
stat);
freemem(segp);
return 0;
}