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.

51 lines
1.1 KiB

  1. //
  2. // REGMEM.H
  3. //
  4. // Copyright (C) Microsoft Corporation, 1995
  5. //
  6. #ifndef _REGMEM_
  7. #define _REGMEM_
  8. LPVOID
  9. INTERNAL
  10. RgAllocMemory(
  11. UINT cbBytes
  12. );
  13. LPVOID
  14. INTERNAL
  15. RgReAllocMemory(
  16. LPVOID lpMemory,
  17. UINT cbBytes
  18. );
  19. #ifdef DEBUG
  20. VOID
  21. INTERNAL
  22. RgFreeMemory(
  23. LPVOID
  24. );
  25. #else
  26. #ifdef VXD
  27. #define RgFreeMemory(lpv) (FreePages(lpv))
  28. #else
  29. #define RgFreeMemory(lpv) (FreeBytes(lpv))
  30. #endif
  31. #endif
  32. // Use the RgSm*Memory macros to allocate small chunks of memory off the heap.
  33. // For the VMM mode registry, the Rg*Memory functions will allocate pages,
  34. // while the RgSm*Memory functions will allocate from the heap. For all other
  35. // modes, the two sets are equivalent.
  36. #if defined(VXD)
  37. #define RgSmAllocMemory AllocBytes
  38. #define RgSmFreeMemory FreeBytes
  39. #define RgSmReAllocMemory ReAllocBytes
  40. #else
  41. #define RgSmAllocMemory RgAllocMemory
  42. #define RgSmFreeMemory RgFreeMemory
  43. #define RgSmReAllocMemory RgReAllocMemory
  44. #endif
  45. #endif // _REGMEM_