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.

85 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 2001-2002 Microsoft Corporation
  3. Module Name:
  4. CmnDbgK.c
  5. Abstract:
  6. Implementation of driver-specific routines declared in HttpCmn.h
  7. Author:
  8. George V. Reilly (GeorgeRe) 07-Dec-2001
  9. Revision History:
  10. --*/
  11. #include "precomp.h"
  12. PVOID
  13. HttpCmnAllocate(
  14. IN POOL_TYPE PoolType,
  15. IN SIZE_T NumBytes,
  16. IN ULONG PoolTag,
  17. IN PCSTR pFileName,
  18. IN USHORT LineNumber)
  19. {
  20. #if DBG
  21. return UlDbgAllocatePool(
  22. PoolType,
  23. NumBytes,
  24. PoolTag,
  25. pFileName,
  26. LineNumber,
  27. NULL);
  28. #else // !DBG
  29. UNREFERENCED_PARAMETER(pFileName);
  30. UNREFERENCED_PARAMETER(LineNumber);
  31. return ExAllocatePoolWithTagPriority(
  32. PoolType,
  33. NumBytes,
  34. PoolTag,
  35. LowPoolPriority
  36. );
  37. #endif // !DBG
  38. } // HttpCmnAlloc
  39. VOID
  40. HttpCmnFree(
  41. IN PVOID pMem,
  42. IN ULONG PoolTag,
  43. IN PCSTR pFileName,
  44. IN USHORT LineNumber)
  45. {
  46. #if DBG
  47. UlDbgFreePool(
  48. pMem,
  49. PoolTag,
  50. pFileName,
  51. LineNumber,
  52. PagedPool,
  53. 0,
  54. NULL
  55. );
  56. #else // !DBG
  57. UNREFERENCED_PARAMETER(pFileName);
  58. UNREFERENCED_PARAMETER(LineNumber);
  59. # if USE_FREE_POOL_WITH_TAG
  60. ExFreePoolWithTag(pMem, PoolTag);
  61. # else
  62. UNREFERENCED_PARAMETER(PoolTag);
  63. ExFreePool(pMem);
  64. # endif
  65. #endif // !DBG
  66. } // HttpCmnFree