Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:docs:fapi:dossubfree [2021/08/20 04:31] – prokushev | en:docs:fapi:dossubfree [2021/12/05 11:05] (current) – prokushev | ||
---|---|---|---|
Line 5: | Line 5: | ||
This call frees memory previously allocated by DosSubAlloc. | This call frees memory previously allocated by DosSubAlloc. | ||
- | ==Syntax== | + | ===== Syntax ===== |
- | | + | <code c> |
+ | DosSubFree (SegSelector, | ||
+ | </ | ||
- | ==Parameters== | + | ===== Parameters |
- | ;SegSelector (SEL) - input : Data segment selector. | + | |
- | ;BlockOffset (USHORT) - input : Memory block offset. The value specified must equal the BlockOffset returned on a previous DosSubAlloc call. | + | * SegSelector ([[SEL]]) - input : Data segment selector. |
- | ;Size (USHORT) - input : Size, in bytes, of the block to be freed. | + | |
+ | | ||
+ | |||
+ | ===== Return Code ===== | ||
+ | |||
+ | rc ([[USHORT]]) - return | ||
- | ==Return Code== | ||
- | rc (USHORT) - return | ||
Return code descriptions are: | Return code descriptions are: | ||
- | * 0 NO_ERROR | ||
- | * 312 ERROR_DOSSUB_OVERLAP | ||
- | * 313 ERROR_DOSSUB_BADSIZE | ||
- | ==Remarks== | + | * 0 NO_ERROR |
- | DosSubFree specifies the offset of a block of memory previously suballocated by a DosSubAlloc request. If the block specified overlaps memory in the segment that is not suballocated, | + | * 312 ERROR_DOSSUB_OVERLAP |
+ | * 313 ERROR_DOSSUB_BADSIZE | ||
- | The allocated segment is freed by calling DosFreeSeg. | + | ===== Remarks ===== |
- | ==Example Code== | + | DosSubFree specifies the offset of a block of memory previously suballocated by a [[DosSubAlloc]] request. If the block specified overlaps memory in the segment that is not suballocated, |
- | ===C Binding=== | + | |
- | <PRE> | + | The allocated segment is freed by calling [[DosFreeSeg]]. |
+ | |||
+ | ===== Example Code ===== | ||
+ | |||
+ | ==== C Binding ==== | ||
+ | |||
+ | <code c> | ||
#define INCL_DOSMEMMGR | #define INCL_DOSMEMMGR | ||
Line 37: | Line 46: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM Binding=== | + | ==== MASM Binding ==== |
- | <PRE> | + | |
+ | <code asm> | ||
EXTRN DosSubFree: | EXTRN DosSubFree: | ||
INCL_DOSMEMMGR | INCL_DOSMEMMGR | ||
Line 48: | Line 58: | ||
PUSH | PUSH | ||
CALL | CALL | ||
+ | </ | ||
Returns WORD | Returns WORD | ||
- | </ | ||
- | |||
- | ====== Note ====== | + | ===== Note ===== |
Text based on [[http:// | Text based on [[http:// |