Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |
en:docs:fapi:dossubset [2021/09/17 08:56] – prokushev | en:docs:fapi:dossubset [2021/12/05 11:06] (current) – prokushev |
---|
To initialize a segment for suballocation, issue DosSubSet before issuing [[DosSubAlloc]] and set Flags = 1. The segment must have been allocated with [[DosAllocSeg]] or [[DosAllocShrSeg]]. | To initialize a segment for suballocation, issue DosSubSet before issuing [[DosSubAlloc]] and set Flags = 1. The segment must have been allocated with [[DosAllocSeg]] or [[DosAllocShrSeg]]. |
| |
If a segment allocated by a [[DosAllocSeg]] call has already been set for suballocation, and a call to DosSubAlloc returns ERROR_DOSSUB_NOMEM, the segment's size can be increased by a call to [[DosReallocSeg]]. After reallocation, the segment must be reset by a DosSubSet. Failure to reset the segment after changing its size can yield unpredictable results. | If a segment allocated by a [[DosAllocSeg]] call has already been set for suballocation, and a call to [[[DosSubAlloc]] returns ERROR_DOSSUB_NOMEM, the segment's size can be increased by a call to [[DosReallocSeg]]. After reallocation, the segment must be reset by a DosSubSet. Failure to reset the segment after changing its size can yield unpredictable results. |
| |
The size parameter should be a multiple of four bytes, or it is rounded up to a multiple of four. Note in DosSubSet, a size parameter of 0 indicates the segment is 64KB, while in [[DosSubAlloc]] and [[DosSubFree]], a size parameter of 0 is an error. Other than this special case of 0 meaning 64KB, the minimum size that can be set is 12 bytes. | The size parameter should be a multiple of four bytes, or it is rounded up to a multiple of four. Note in DosSubSet, a size parameter of 0 indicates the segment is 64KB, while in [[DosSubAlloc]] and [[DosSubFree]], a size parameter of 0 is an error. Other than this special case of 0 meaning 64KB, the minimum size that can be set is 12 bytes. |