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.

64 lines
1.5 KiB

  1. /****************************************************************************/
  2. // dbg.h
  3. //
  4. // RDPDR debug header
  5. //
  6. // Copyright (C) 1998-2000 Microsoft Corp.
  7. /****************************************************************************/
  8. //
  9. // KDX support
  10. //
  11. #ifdef DRKDX
  12. #define private public
  13. #define protected public
  14. #endif
  15. #define __STR2__(x) #x
  16. #define __STR1__(x) __STR2__(x)
  17. #define __LOC__ __FILE__ "("__STR1__(__LINE__)") : warning CUSER: "
  18. //
  19. // Object and Memory Tracking Defines
  20. //
  21. #define GOODMEMMAGICNUMBER 0x08854107
  22. #define BADMEM 0xDE
  23. #define UNITIALIZEDMEM 0xBB
  24. #define FREEDMEMMAGICNUMBER 0x08815412
  25. //
  26. // Memory Allocation Subpool Tags
  27. //
  28. #define DRTOPOBJ_SUBTAG 'JBOT'
  29. #define DRGLOBAL_SUBTAG 'rDrD'
  30. //
  31. // Memory Allocation Routines
  32. //
  33. #if DBG
  34. // The Functions
  35. void *DrAllocatePool(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag);
  36. void DrFreePool(void *ptr);
  37. // The Macros
  38. /*#define DRALLOCATEPOOL(size, poolType, subTag) \
  39. DrAllocatePool(size, poolType, subTag)
  40. #define DRFREEPOOL(ptr) \
  41. DrFreePool(ptr)
  42. */
  43. #define DRALLOCATEPOOL ExAllocatePoolWithTag
  44. #define DRFREEPOOL ExFreePool
  45. #else // DBG
  46. #define DRALLOCATEPOOL ExAllocatePoolWithTag
  47. #define DRFREEPOOL ExFreePool
  48. /*#define DRALLOCATEPOOL(size, poolType, subTag) \
  49. ExAllocatePoolWithTag(poolType, size, DR_POOLTAG)
  50. #define DRFREEPOOL(ptr) \
  51. ExFreePool(ptr)
  52. */
  53. #endif // DBG