Leaked source code of windows server 2003
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.

146 lines
4.1 KiB

  1. //============== DAE: OS/2 Database Access Engine ===================
  2. //============== daeconst.h: Global System Constants ===================
  3. #define cpgDatabaseMin 16
  4. #define cpgDatabaseMax (1UL << 19)
  5. #define pgnoSystemRoot ((PGNO) 1)
  6. #define itagSystemRoot 0
  7. #define szSystemDatabase "system.mdb"
  8. #define szTempDBFileName "temp.mdb"
  9. #define szTempFile "temp.tmp"
  10. /* number of pages of system root FDP primary extent */
  11. #define cpgSystemPrimary ((CPG) 1)
  12. /* initial temporary file allocation */
  13. #define cpgTempFile ((CPG) 1)
  14. /* discontinuity measurement unit
  15. /**/
  16. #define cpgDiscont 16
  17. /* default density
  18. /**/
  19. #define ulDefaultDensity 80 // 80% density
  20. #define ulFILEDensityLeast 20 // 20% density
  21. #define ulFILEDensityMost 100 // 100% density
  22. #define dbidTemp ((DBID) 0)
  23. #define dbidSystemDatabase ((DBID) 1)
  24. #define dbidUserMin ((DBID) 1)
  25. #define dbidMin ((DBID) 0)
  26. #define dbidUserMax ((DBID) 67)
  27. #define dbidMax dbidUserMax
  28. /* number of buffer hash table entries
  29. /* should be prime
  30. /**/
  31. #define ipbfMax 8191
  32. /* vertical split threshold
  33. /**/
  34. #define cbVSplitThreshold 400
  35. /* Engine OBJIDs:
  36. /*
  37. /* 0..0x10000000 reserved for engine use, divided as follows:
  38. /*
  39. /* 0x00000000..0x0000FFFF reserved for TBLIDs under RED
  40. /* 0x00000000..0x0EFFFFFF reserved for TBLIDs under BLUE
  41. /* 0x0F000000..0x0FFFFFFF reserved for container IDs
  42. /* 0x10000000 reserved for ObjectId of DbObject
  43. /*
  44. /* Client OBJIDs begin at 0x10000001 and go up from there.
  45. /**/
  46. #define objidNil ((OBJID) 0x00000000)
  47. #define objidRoot ((OBJID) 0x0F000000)
  48. #define objidTblContainer ((OBJID) 0x0F000001)
  49. #define objidDbContainer ((OBJID) 0x0F000002)
  50. #define objidRcContainer ((OBJID) 0x0F000003)
  51. #define objidDbObject ((OBJID) 0x10000000)
  52. /* Magic number used in database root node for integrity checking
  53. /**/
  54. #define ulDAEMagic 0x89abcdef
  55. #define ulDAEVersion 0x00000001
  56. #define ulDAEPrevVersion 0x00000000
  57. #define szVerbose "BLUEVERBOSE"
  58. #define szNull ""
  59. /* transaction level limits.
  60. /**/
  61. #define levelMax ((LEVEL)10) // all level < 10
  62. #define levelMost ((LEVEL)9) // max for engine
  63. #define levelUserMost ((LEVEL)7) // max for user
  64. #define levelMin ((LEVEL)0)
  65. /* Start and max waiting period for WaitTillOldest
  66. /**/
  67. #define ulStartTimeOutPeriod 20
  68. #define ulMaxTimeOutPeriod 60000
  69. /* default resource allocation
  70. /**/
  71. #define cDBOpenDefault 100
  72. #define cbucketLowerThreshold 8
  73. #define cbufThresholdLowDefault 20
  74. #define cbufThresholdHighDefault 80
  75. #define cpibDefault 10
  76. #define cbgcbDefault 4
  77. #define cfucbDefault 300
  78. #define cfcbDefault 300
  79. #define cscbDefault 20
  80. #define cidbDefault cfcbDefault
  81. #define cbufDefault 500
  82. #define clgsecBufDefault 21
  83. #define clgsecGenDefault 250
  84. #define clgsecFTHDefault 10
  85. #define cbucketDefault 64
  86. #define lWaitLogFlushDefault 15
  87. #define lLogFlushPeriodDefault 45
  88. #define lLGCheckpointPeriodDefault 10
  89. //#define lLGCheckpointPeriodDefault 100
  90. #define lLGWaitingUserMaxDefault 3
  91. #define lPageFragmentDefault 8
  92. #define cdabDefault 100
  93. #define lBufLRUKCorrelationIntervalDefault 0
  94. #define lBufBatchIOMaxDefault 64
  95. #define lPageReadAheadMaxDefault 4
  96. #define lAsynchIOMaxDefault 64
  97. /* resource relationships for derived resources
  98. /**/
  99. #define lCSRPerFUCB 2
  100. /* system resource requirements
  101. /**/
  102. #define cpibSystem 3
  103. #define cbucketSystem 2
  104. /* vertical split minimum in non-FDP page.
  105. /**/
  106. #define cbVSplitMin 100
  107. /* code page constants.
  108. /**/
  109. #define usUniCodePage 1200 /* code page for Unicode strings */
  110. #define usEnglishCodePage 1252 /* code page for English */
  111. /* length of modified page list
  112. /**/
  113. #define cmpeMax 8192
  114. /* idle processing constants
  115. /**/
  116. #define icallIdleBMCleanMax cmpeMax
  117. /* wait time for latch/crit conflicts
  118. /**/
  119. #define cmsecWaitGeneric 100
  120. #define cmsecWaitWriteLatch 10
  121. #define cmsecWaitLogFlush 1