[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
DosFreeSeg() Free memory block allocated with DosAllocSeg() or DosAllocHuge().
------------------------------------------------------------------------------
Function : Free a memory block allocated with DosAllocSeg() or
DosAllocHuge().
Syntax : USHORT BLXAPI DosFreeSeg(SEL selector);
selector Protected mode selector of a memory block allocated through
DosAllocSeg() or DosAllocHuge().
Return : None
This function is used to free memory blocks allocated through DosAllocSeg()
or DosAllocHuge() and should not be used to free any other type of selector.
Example:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <blx286.h>
void main (void)
{
SEL selector;
/* Allocate a 4KB block */
if (DosAllocSeg(4096, &selector, 0) != 0)
{
printf("DosAllocSeg() failed\n");
exit(255);
}
printf("4 Kb block allocated at : %04X\n",selector);
if (DosFreeSeg(selector) != 0)
{
printf("DosFreeSeg() failed - selector = %04X\n",
selector);
exit(254);
}
}
See Also:
DosFreeRealSeg()
DosFreeSelector()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson