home *** CD-ROM | disk | FTP | other *** search
- /***
- * vm.h -
- *
- * Copyright (c) 1989-1992, Microsoft Corporation. All rights reserved.
- *
- *******************************************************************************/
-
- #ifndef PUBLIC
- #define PUBLIC _far _pascal
- #endif
-
- typedef unsigned long VPVOID; /* vp */
- typedef unsigned long VPAGE; /* vpag */
-
- #ifndef cbVmPage
- #define cbVmPage 2048U
- #endif
-
- #define cbVmPara 16U
-
- #define cParaPerPage (cbVmPage/cbVmPara)
-
- #define vpNil ((VPVOID) 0)
-
- #define IbOfVp(vp) ((vp) & (cbVmPage-1))
- #define VpPageOfVp(vp) ((vp) & ~(cbVmPage-1L))
- #define PageOfVp(vp) ((VPAGE) ((vp) / cbVmPage))
-
- #define VpOfPageIb(vpag, ib) ((VPVOID) (((vpag) * cbVmPage) + (ib)))
-
- int PUBLIC __FVmInitialize(unsigned cVmParaMin, unsigned cParaVmDosMax, unsigned bitSwapArea);
- void PUBLIC __VmTerminate(void);
-
- VPVOID PUBLIC __VpVmAllocatePage(void);
- VPVOID PUBLIC __VpVmAllocateCb(unsigned long cb);
-
- PVOID PUBLIC __PVmLoadVp(VPVOID vp, int fDirty);
- PVOID PUBLIC __PVmLoadVpCb(VPVOID vp, unsigned long cb, int fDirty);
-
- PVOID PUBLIC __PVmLockVp(VPVOID vp);
- PVOID PUBLIC __PVmLockVpCb(VPVOID vp, unsigned long cb);
- void PUBLIC __VmUnlockVp(VPVOID vp, int fDirty);
- void PUBLIC __VmUnlockVpCb(VPVOID vp, unsigned long cb, int fDirty);
- unsigned PUBLIC __CVmLockVp(VPVOID vp);
-
- #if VMFREE
-
- void PUBLIC __VmFreePageVp(VPVOID vp);
- void PUBLIC __VmFreePageVpCb(VPVOID vp, unsigned long cb);
-
- #endif /* VMFREE */
-
-
- extern char _near _fVmDisableDisk;
- extern char _near _fVmDisableEms;
- extern char _near _fVmDisableXms;
-
- #ifdef VMDEBUG
-
- extern int _near _fVmFillPages;
- extern char _near _bVmFillPages;
-
- #endif /* VMDEBUG */
-
- #if VMPROFILE
-
- extern int _near _fVmProfile;
-
- #endif /* VMPROFILE */
-
- #if VMTRACE
-
- extern int _near _fVmTrace;
-
- #endif /* VMTRACE */
-
-