[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
_xfree()
Free allocated memory
------------------------------------------------------------------------------
C Prototype
#include "Extend.h"
void _xfree(void far *mem)
Arguments
mem is a far pointer to memory allocated with _xalloc() or
_xgrab().
Returns
_xfree() has no return value.
Description
_xfree() releases memory allocated by _xalloc() or _xgrab(). Note that
the same pointer returned by _xalloc() or _xgrab() must be passed as
the argument to _xfree().
-----------------------------------------------------------------------
. Note
In Extend.h, _exmback() is #defined to _xfree() to maintain
compatibility with Summer '87.
-----------------------------------------------------------------------
Examples
From C:
char *mem;
mem = _xgrab(32);
_xfree(mem);
From Assembly language:
EXTRN __xgrab:FAR
EXTRN __xfree:FAR
mov ax, 32
push ax
call __xgrab ; pointer in DX:AX
add sp, 2 ; reset stack pointer
push dx
push ax
call __xfree ; give it right back
add sp, 4
Files: Library is CLIPPER.LIB, header file is Extend.h.
See Also:
_xalloc()
_xgrab()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson