C语言函数—freopen

函数名

freemem

功 能

释放先前分配的DOS内存块

用 法

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: 
      %xn", segp); 
   else 
      printf("Failed: maximum number of 
      paragraphs available is %un", 
      stat); 
   freemem(segp); 

   return 0; 
} 
  
  

如果引用本站的原创文章,请注明原文链接:,本站保留追究责任的权利!