This DPMI 0.9 Specification is hosted by Tenberry Software, Inc.

15. Demand Paging Performance Tuning Services


[Next Section] * [Previous Section] * [DPMI Index]
[Tenberry Home] * [Software Quality] * [DOS/4G] * [DOS/4GW] * [DOS/16M]

Some applications will discard memory objects or will not access objects for long periods of time. These services can be used to improve the performance of demand paging.

Although these functions are only relevant for DPMI implementations that support virtual memory, other implementations will ignore these functions (it will always return carry clear). Therefore your code can always call these functions regardless of the environment it is running under.

Since both of these functions are simply advisory functions, the operating system may choose to ignore them. In any case, your code should function properly even if the functions fail.


15.1 Reserved Subfunctions

Functions 0700h and 0701h are reserved and should not be called.


15.2 Mark Page as Demand Paging Candidate

This function is used to inform the operating system that a range of pages should be placed at the head of the page out candidate list. This will force these pages to be swapped to disk ahead of other pages even if the memory has been accessed recently. However, all memory contents will be preserved.

This is useful, for example, if a program knows that a given piece of data will not be accessed for a long period of time. That data is ideal for swapping to disk since the physical memory it now occupies can be used for other purposes.

To Call

     AX = 0702h
     BX:CX = Starting linear address of pages to mark
     SI:DI = Number of bytes to mark as paging candidates

Returns

     If function was successful:
     Carry flag is clear.

     If function was not successful:
     Carry flag is set.

Programmer's Notes


15.3 Discard Page Contents

This function discards the entire contents of a given linear memory range. It is used after a memory object that occupied a given piece of memory has been discarded.

The contents of the region will be undefined the next time the memory is accessed. All values previously stored in this memory will be lost.

To Call

     AX = 0703h
     BX:CX = Starting linear address of pages to discard
     SI:DI = Number of bytes to discard

Returns

     If function was successful:
     Carry flag is clear.

     If function was not successful:
     Carry flag is set.

Programmer's Notes


[Next Section] * [Previous Section] * [DPMI Index]
[Tenberry Home] * [Software Quality] * [DOS/4G] * [DOS/4GW] * [DOS/16M]
This HTML edition of the DPMI 0.9 Specification is hosted by Tenberry Software, Inc., makers of the DOS/16M and the DOS/4G family of DOS extenders. Page last modified 2003.1.28, <webmaster@tenberry.com>