home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1998 November / VPR9811A.BIN / BENCH / CWSDPMI2 / CWSDPMI2.LZH / SRC.LZH / DALLOC.H < prev    next >
Text File  |  1996-06-15  |  1KB  |  37 lines

  1. /* Copyright (C) 1995,1996 CW Sandmann (sandmann@clio.rice.edu) 1206 Braelinn, Sugarland, TX 77479
  2. ** Copyright (C) 1993 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
  3. **
  4. ** This file is distributed under the terms listed in the document
  5. ** "copying.cws", available from CW Sandmann at the address above.
  6. ** A copy of "copying.cws" should accompany this file; if not, a copy
  7. ** should be available from where this file was obtained.  This file
  8. ** may not be distributed without a verbatim copy of "copying.cws".
  9. **
  10. ** This file is distributed WITHOUT ANY WARRANTY; without even the implied
  11. ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. */
  13.  
  14. #define MAX_DARRAY 4096        /* 4096 * 8 -> 128 Mb */
  15.  
  16. #if MAX_DARRAY > 8192
  17. typedef unsigned long da_pn;    /* Must be unsigned long for > 256Mb virtual */
  18. #else
  19. typedef unsigned short da_pn;
  20. #endif
  21.  
  22. #define MAX_DBLOCK ((da_pn)(MAX_DARRAY-1) << 3)
  23.  
  24. void dalloc_file(char *swapname);
  25. void dalloc_init(void);
  26. void dalloc_uninit(void);
  27.  
  28. da_pn dalloc(void);
  29. void dfree(da_pn);
  30.  
  31. /* These return pages */
  32. da_pn dalloc_max_size(void);
  33. da_pn dalloc_used(void);
  34.  
  35. void dwrite(word8 *buf, da_pn block);
  36. void dread(word8 *buf, da_pn block);
  37.