Jump to content

FS ALLOCATEPAGESPACE: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Ak120 (talk | contribs)
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:FS_ALLOCATEPAGESPACE}}
{{DISPLAYTITLE:FS_ALLOCATEPAGESPACE}}
Adjust the size of paging file. Changes the size the paging file on disk.
Adjust the size of paging file. Changes the size the paging file on disk.
==Syntax==
==Syntax==
  int far pascal FS_ALLOCATEPAGESPACE(psffsi, psffsd, ulsize, ulWantContig)
  int far pascal FS_ALLOCATEPAGESPACE(psffsi, psffsd, ulsize, ulWantContig)
==Parameters==
==Parameters==
;psffsi: is a pointer to the file-system-independent portion of an open file instance.
;psffsi: is a pointer to the file-system-independent portion of an open file instance.
Line 9: Line 11:
;ulWantContig: indicates the minimum contiguity requirement (in bytes)
;ulWantContig: indicates the minimum contiguity requirement (in bytes)


==Returns==
==Sample==
  struct sffsi far * psffsi;
  struct sffsi far * psffsi;
  struct sffsd far * psffsd;
  struct sffsd far * psffsd;
Line 18: Line 17:
   
   
  int far pascal FS_ALLOCATEPAGESPACE(psffsi, psffsd, ulsize, ulWantContig)
  int far pascal FS_ALLOCATEPAGESPACE(psffsi, psffsd, ulsize, ulWantContig)
==Remarks==
==Remarks==
ulWantContig is a demand for contiguity. If ulWantContig is non-zero(0), the FSD must allocate any space in the swap file that is not contiguous in ulWantContig chunks on ulWantContig boundaries. If it is not possible to grow the file to ulSize bytes meeting the ulWantContig requirement, the operation should fail. If the file is being shrunk ulWantContig is irrelevant and should be ignored.
ulWantContig is a demand for contiguity. If ulWantContig is non-zero(0), the FSD must allocate any space in the swap file that is not contiguous in ulWantContig chunks on ulWantContig boundaries. If it is not possible to grow the file to ulSize bytes meeting the ulWantContig requirement, the operation should fail. If the file is being shrunk ulWantContig is irrelevant and should be ignored.


FSDs that support the paging I/O interface should be expected to be sensible in allocating page space. In particular, they are expected to always attempt to allocate space such that ulWantContig sized blocks on ulWantContig boundaries are physically contiguous on disk, and to keep the page file as a whole contiguous as possible.
FSDs that support the paging I/O interface should be expected to be sensible in allocating page space. In particular, they are expected to always attempt to allocate space such that ulWantContig sized blocks on ulWantContig boundaries are physically contiguous on disk, and to keep the page file as a whole contiguous as possible.
[[Category:IFS Interfaces]]

Latest revision as of 01:29, 9 February 2020

Adjust the size of paging file. Changes the size the paging file on disk.

Syntax

int far pascal FS_ALLOCATEPAGESPACE(psffsi, psffsd, ulsize, ulWantContig)

Parameters

psffsi
is a pointer to the file-system-independent portion of an open file instance.
psffsd
is a pointer to the file-system-dependent portion of an open file instance.
ulsize
is the desired new size of the paging file. If the new size is smaller than the current size, the excess space is released. If the new size is larger than the current size, the requested size is allocated.
ulWantContig
indicates the minimum contiguity requirement (in bytes)
struct sffsi far * psffsi;
struct sffsd far * psffsd;
unsigned long ulsize;
unsigned short ulWantContig;

int far pascal FS_ALLOCATEPAGESPACE(psffsi, psffsd, ulsize, ulWantContig)

Remarks

ulWantContig is a demand for contiguity. If ulWantContig is non-zero(0), the FSD must allocate any space in the swap file that is not contiguous in ulWantContig chunks on ulWantContig boundaries. If it is not possible to grow the file to ulSize bytes meeting the ulWantContig requirement, the operation should fail. If the file is being shrunk ulWantContig is irrelevant and should be ignored.

FSDs that support the paging I/O interface should be expected to be sensible in allocating page space. In particular, they are expected to always attempt to allocate space such that ulWantContig sized blocks on ulWantContig boundaries are physically contiguous on disk, and to keep the page file as a whole contiguous as possible.