Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
4.1 KiB

  1. /*** clearmem.h- Public defines and structure definitions for cache flusher.
  2. *
  3. *
  4. * Title:
  5. * Cache flusher include file used by all
  6. *
  7. * Copyright (c) 1990, Microsoft Corporation.
  8. * Russ Blake.
  9. *
  10. *
  11. * Modification History:
  12. * 90.03.08 - RussBl -- Created
  13. *
  14. */
  15. /* * * * * * * * * N T C o m m o n D e f i n e s * * * * * * * * * */
  16. #define RC NTSTATUS
  17. /* * * * * * * * C o m m o n M i s c . D e f i n e s * * * * * * * */
  18. // Runtime flags
  19. //
  20. // #define STATIC static // This is defined so all the defined STATIC
  21. #define STATIC // functions can easily become non-static by
  22. // changing this define to "". Remember that
  23. // static functions are not visiable by the
  24. // kernel debugger.
  25. #define RESERVED_NULL NULL // Reserved null fields
  26. // #define CF_DEBUG_L1 // Flag indicating display of debug info - Level1
  27. // (Level 1: Displays process/thread arguments
  28. // #define CF_DEBUG_L2 // Flag indicating display of debug info - Level2
  29. // (Level 2: Displays thread start/completion info
  30. // #define CF_DEBUG_L3 // Flag indicating display of debug info - Level3
  31. // (Level 3: Displays CF cycle states' info
  32. // #define CF_DEBUG_L4 // Flag indicating display of debug info - Level4
  33. // (Level 4: Displays CF cycle timing info
  34. // User defined error codes
  35. //
  36. #define LOGIC_ERR 0x7FFFFF01L // Error code indicating logic error
  37. // is encountered
  38. #define INPUTARGS_ERR 0x7FFFFF02L // Error code for invalid number of
  39. // input arguments
  40. #define FILEARG_ERR 0x7FFFFF03L // Error code for invalid input file
  41. // argument
  42. #define TIMEARG_ERR 0x7FFFFF04L // Error code for invalid trail time
  43. // argument
  44. #define INSUFMEM_ERR 0x7FFFFF05L // Error code indicating memory can't
  45. // be allocated by MALLOC/REALLOC
  46. #define MEANSDEV_ERR 0x7FFFFF06L // Error code for invalid mean and/or
  47. // standard deviation
  48. #define FSEEK_ERR 0x7FFFFF07L // Error code indicating fseek()
  49. // failure
  50. #define FCLOSE_ERR 0x7FFFFF08L // Error code indicating fclose()
  51. // failure
  52. #define FFLUSH_ERR 0x7FFFFF09L // Error code indicating fflush()
  53. // failure
  54. #define FOPEN_ERR 0x7FFFFF0AL // Error code indicating fopen()
  55. // failure
  56. #define PRCSETUP_ERR 0x7FFFFF0BL // Error code indicating error during
  57. // child process setup/initialization
  58. #define THDSETUP_ERR 0x7FFFFF0CL // Error code indicating error during
  59. // thread setup/initialization
  60. #define PROCINFO_ERR 0x7FFFFF0DL // Error code indicating error during
  61. // retrieval of process information
  62. #define SETWSET_ERR 0x7FFFFF0EL // Error code indicating error during
  63. // setting of working set information
  64. // Maximu length defines
  65. //
  66. #define FNAME_LEN 256 // Maximum file name langth
  67. #define LINE_LEN 128 // Maximum input line length
  68. #define ULONG_LEN 15 // Maximum length required to store
  69. // ULONG values in ASCII format
  70. // 10+1(null)=11
  71. #define ERR_NOFILE 0xFFFFFFFFL // Failure from CreateFile
  72. // String (EXEs & KEYs) constants
  73. //
  74. #define CF_EXE "CLEARMEM.EXE" // CF's binary name
  75. // Other defines
  76. //
  77. #define PAGESIZE 4096 // Page size in bytes
  78. #define SECTION_SIZE 16*1024*1024L // Size of data section for flushing
  79. #define FLUSH_FILE_SIZE 256*1024L // Size of flush file
  80. // Next is max that cache will permit in WS at one time for each file,
  81. // less 1 (or we reach into next private segment because of how we
  82. // alternate read locations)
  83. #define NUM_FLUSH_READS 63 // Number of pages to read:
  84. #define LAZY_DELAY 5000L // Lazy Writer delay
  85. #define NUM_FILES 3 // Number of flush files
  86.