MFSH SEGREALLOC: Difference between revisions
Appearance
Created page with "{{DISPLAYTITLE:MFSH_SEGREALLOC}} Change the size of memory. ==Syntax== int far pascal MFSH_SEGREALLOC(usSel, cbSeg) ==Parameters== ; usSel: contains the selector of the seg..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:MFSH_SEGREALLOC}} | {{DISPLAYTITLE:MFSH_SEGREALLOC}} | ||
Change the size of memory. | Change the size of memory. | ||
==Syntax== | ==Syntax== | ||
int far pascal MFSH_SEGREALLOC(usSel, cbSeg) | int far pascal MFSH_SEGREALLOC(usSel, cbSeg) | ||
==Parameters== | ==Parameters== | ||
; usSel: contains the selector of the segment to be resized. | ; usSel: contains the selector of the segment to be resized. | ||
; cbSeg: contains the new length of the segment. | ; cbSeg: contains the new length of the segment. | ||
==Returns== | ==Returns== | ||
If no error is detected, a zero error code is returned. If an error is detected, on of the following error codes is returned: | If no error is detected, a zero error code is returned. If an error is detected, on of the following error codes is returned: | ||
; ERROR_NOT_MEMORY: | ;ERROR_NOT_MEMORY: too much memory is allocated. | ||
; ERROR_PROTECTION_VIOLATION: the supplied selector is invalid. | ;ERROR_PROTECTION_VIOLATION: the supplied selector is invalid. | ||
; ERROR_INVALID_PARAMETER: the supplied length is invalid. | ;ERROR_INVALID_PARAMETER: the supplied length is invalid. | ||
==Sample== | ==Sample== | ||
Line 23: | Line 23: | ||
This call changes the size of a segment previously allocated with MFSH_ SEGALLOC, or loaded as part of the mini-FSD image. | This call changes the size of a segment previously allocated with MFSH_ SEGALLOC, or loaded as part of the mini-FSD image. | ||
The segment may be grown or shrunk. When grown, the extra space is uninitialized. The segment may be moved in the process. | The segment may be grown or shrunk. When grown, the extra space is uninitialized. The segment may be moved in the process. | ||
Revision as of 20:40, 21 May 2019
Change the size of memory.
Syntax
int far pascal MFSH_SEGREALLOC(usSel, cbSeg)
Parameters
- usSel
- contains the selector of the segment to be resized.
- cbSeg
- contains the new length of the segment.
Returns
If no error is detected, a zero error code is returned. If an error is detected, on of the following error codes is returned:
- ERROR_NOT_MEMORY
- too much memory is allocated.
- ERROR_PROTECTION_VIOLATION
- the supplied selector is invalid.
- ERROR_INVALID_PARAMETER
- the supplied length is invalid.
Sample
unsigned short usSel; unsigned long cbSeg; int far pascal MFSH_SEGREALLOC(usSel, cbSeg)
Remarks
This call changes the size of a segment previously allocated with MFSH_ SEGALLOC, or loaded as part of the mini-FSD image.
The segment may be grown or shrunk. When grown, the extra space is uninitialized. The segment may be moved in the process.