[Previous]
[Contents]
[Next]

hfree()

free memory that was allocated with halloc

Synopsis:

#include <malloc.h>
void hfree( void __huge *ptr );

Description:

The hfree() function deallocates a memory block previously allocated by the halloc() function. The argument ptr points to a memory block to be deallocated. After the call, the freed block is available for allocation.

Examples:

#include <stdio.h>
#include <malloc.h>

void main()
  {
    long int __huge *big_buffer;

    big_buffer = (long int __huge *)
          halloc( 1024L, sizeof(long) );
    if( big_buffer == NULL ) {
      printf( "Unable to allocate memory\n" );
    } else {

      /* rest of code goes here */

      hfree( big_buffer );  /* deallocate */
    }
  }

Classification:

WATCOM

Safety:
Interrupt handler Unknown
Signal handler Unknown
Thread Unknown

See also:

calloc(), _expand(), free(), halloc(), malloc(), _msize(), realloc(), sbrk()


[Previous]
[Contents]
[Next]