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.

175 lines
4.6 KiB

  1. #define cpgDatabaseMin 256
  2. #define cpgDatabaseMax (1UL << 19)
  3. #define pgnoSystemRoot ((PGNO) 1)
  4. #define itagSystemRoot 0
  5. #define szOn "on"
  6. #define szSystem "system"
  7. #define szTempDir "temp\\"
  8. #define szBakExt ".bak"
  9. #define szPatExt ".pat"
  10. #define szLogExt ".log"
  11. #define szChkExt ".chk"
  12. #define szRestoreMap "restore.map"
  13. #define lGenerationMax 0x100000
  14. #define szAtomicNew "new"
  15. #define szAtomicOld "old"
  16. #define szLogRes1 "res1"
  17. #define szLogRes2 "res2"
  18. /* number of pages of system root FDP primary extent
  19. /**/
  20. #define cpgSystemPrimary ((CPG) 1)
  21. /* discontinuity measurement unit
  22. /**/
  23. #define cpgDiscont 16
  24. /* default density
  25. /**/
  26. #define ulFILEDefaultDensity 80 // 80% density
  27. #define ulFILEDensityLeast 20 // 20% density
  28. #define ulFILEDensityMost 100 // 100% density
  29. #define dbidTemp ((DBID) 0)
  30. #define dbidMin ((DBID) 0)
  31. #define dbidUserLeast ((DBID) 1)
  32. #define dbidMax ((DBID) 7)
  33. /* number of buffer hash table entries
  34. /* should be prime
  35. /**/
  36. #ifdef DAYTONA
  37. #define ipbfMax 2047
  38. #else
  39. #define ipbfMax 16383
  40. #endif
  41. /* vertical split threshold
  42. /**/
  43. #define cbVSplitThreshold 400
  44. /* Engine OBJIDs:
  45. /*
  46. /* 0..0x10000000 reserved for engine use, divided as follows:
  47. /*
  48. /* 0x00000000..0x0000FFFF reserved for TBLIDs under RED
  49. /* 0x00000000..0x0EFFFFFF reserved for TBLIDs under BLUE
  50. /* 0x0F000000..0x0FFFFFFF reserved for container IDs
  51. /* 0x10000000 reserved for ObjectId of DbObject
  52. /*
  53. /* Client OBJIDs begin at 0x10000001 and go up from there.
  54. /**/
  55. #define objidNil ((OBJID) 0x00000000)
  56. #define objidRoot ((OBJID) 0x0F000000)
  57. #define objidTblContainer ((OBJID) 0x0F000001)
  58. #define objidDbContainer ((OBJID) 0x0F000002)
  59. #define objidDbObject ((OBJID) 0x10000000)
  60. #define szVerbose "BLUEVERBOSE"
  61. #define szNull ""
  62. /* transaction level limits
  63. /**/
  64. #define levelMax ((LEVEL)10) // all level < 10
  65. #define levelMost ((LEVEL)9) // max for engine
  66. #define levelUserMost ((LEVEL)7) // max for user
  67. #define levelMin ((LEVEL)0)
  68. /* Start and max waiting period for WaitTillOldest
  69. /**/
  70. #define ulStartTimeOutPeriod 20
  71. #define ulMaxTimeOutPeriod 6000 /* 6 seconds */
  72. /* default resource allocation
  73. /**/
  74. #define cdabDefault 100
  75. #define cbucketLowerThreshold 1
  76. #define cpageDbExtensionDefault 16
  77. #define cpageSEDefault 16
  78. #define ulThresholdLowDefault 20
  79. #define ulThresholdHighDefault 80
  80. #define cBufGenAgeDefault 2
  81. #define cpibDefault 128
  82. #define cfucbDefault 1024
  83. #define cfcbDefault 300
  84. #define cscbDefault 20
  85. #define cidbDefault (cfcbDefault+cscbDefault)
  86. #define cbfDefault 512
  87. #define csecLogBufferDefault 20
  88. #define csecLogFileSizeDefault 5120
  89. #define csecLogFlushThresholdDefault 10
  90. #define cbucketDefault 64
  91. #define lWaitLogFlushDefault 0
  92. #define lLogFlushPeriodDefault 45
  93. #define lLGCheckpointPeriodDefault 1024
  94. #define lLGWaitingUserMaxDefault 3
  95. #define lPageFragmentDefault 8
  96. #define lBufLRUKCorrelationIntervalDefault 0
  97. #define lBufBatchIOMaxDefault 64
  98. #define lPageReadAheadMaxDefault 20
  99. #define lAsynchIOMaxDefault 64
  100. #define cpageTempDBMinDefault 0
  101. /* minimum resource settings are defined below:
  102. /**/
  103. #define lMaxBuffersMin 50
  104. #define lAsynchIOMaxMin 8
  105. #define lLogBufferMin csecLogBufferDefault
  106. #define lLogFileSizeMin 64
  107. /* resource relationships for derived resources
  108. /**/
  109. #define lCSRPerFUCB 2
  110. /* system resource requirements
  111. /**/
  112. #define cpibSystem 4 // bm cleanup, backup, ver, Sync OLC
  113. #define cbucketSystem 2
  114. /* vertical split minimum in non-FDP page
  115. /**/
  116. #define cbVSplitMin 100
  117. /* code page constants
  118. /**/
  119. #define usUniCodePage 1200 /* code page for Unicode strings */
  120. #define usEnglishCodePage 1252 /* code page for English */
  121. /* langid and country defaults
  122. /**/
  123. #define langidDefault 0x0409
  124. #define countryDefault 1
  125. /* length of modified page list
  126. /**/
  127. #define cmpeMax 8192
  128. /* idle processing constants
  129. /**/
  130. #define icallIdleBMCleanMax cmpeMax
  131. /* wait time for latch/crit conflicts
  132. /**/
  133. #define cmsecWaitGeneric 100
  134. #define cmsecWaitWriteLatch 10
  135. #define cmsecWaitLogFlush 1
  136. #define cmsecWaitIOComplete 10
  137. /* initial thread stack sizes
  138. /**/
  139. #define cbIOStack 4096
  140. #define cbBMCleanStack 4096
  141. #define cbRCECleanStack 4096
  142. #define cbBFCleanStack 8192
  143. #define cbFlushLogStack 16384
  144. /* preread start threshold. this is the number of reads in the same
  145. /* direction before we start prereading
  146. /**/
  147. #define cbPrereadThresh 16000
  148. #define lPrereadMost 64
  149.