⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hfree.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
字号:
.func hfree
#include <malloc.h>
void hfree( void __huge *ptr );
.ixfunc2 '&Memory' &func
.funcend
.desc begin
The &func function deallocates a memory block previously allocated by the
.kw halloc
function.
The argument
.arg ptr
points to a memory block to be deallocated.
After the call, the freed block is available for allocation.
.desc end
.return begin
The &func function returns no value.
.return end
.see begin
.im seealloc hfree
.see end
.exmp begin
#include <stdio.h>
#include <malloc.h>

void main()
  {
    long int __huge *big_buffer;
.exmp break
    big_buffer = (long int __huge *)
                  halloc( 1024L, sizeof(long) );
    if( big_buffer == NULL ) {
      printf( "Unable to allocate memory\n" );
    } else {
.exmp break
      /* rest of code goes here */

      hfree( big_buffer );  /* deallocate */
    }
  }
.exmp end
.class WATCOM
.system

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -