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.

62 lines
1.2 KiB

  1. typedef INT_PTR TAG;
  2. #include "../../core/base/memutil.h"
  3. #define ALLOCATE_ZERO_MEMORY(Size) \
  4. _MemAlloc(Size, HEAP_ZERO_MEMORY)
  5. #define ALLOCATE_FIXED_MEMORY(Size) \
  6. MemAllocNe(Size)
  7. #define ALLOCATE_MEMORY(Flags, Size) \
  8. ((Flags & LMEM_ZEROINIT) != 0 ? \
  9. ALLOCATE_ZERO_MEMORY(Size) : ALLOCATE_FIXED_MEMORY(Size))
  10. #define FREE_ZERO_MEMORY(pv) \
  11. FREE_MEMORY((pv))
  12. #define FREE_FIXED_MEMORY(pv) \
  13. FREE_MEMORY((pv))
  14. #define FREE_MEMORY(pv) \
  15. (MemFree((pv)), NULL)
  16. #define REALLOCATE_MEMORY(pv, Size, Flags) \
  17. _MemReAlloc((pv), (Size), HEAP_ZERO_MEMORY)
  18. #define New new_ne
  19. #define INITIALIZE_DEBUG_MEMORY() \
  20. /* NOTHING */
  21. #define TERMINATE_DEBUG_MEMORY(bReport) \
  22. /* NOTHING */
  23. #define CHECK_MEMORY_FREED(bReport) \
  24. /* NOTHING */
  25. #define REPORT_DEBUG_MEMORY(bTermSym, bCloseFile) \
  26. /* NOTHING */
  27. //
  28. // Wininet no longer uses moveable memory
  29. //
  30. #define LOCK_MEMORY(p) (LPSTR)(p)
  31. #define UNLOCK_MEMORY(p)
  32. struct TLSDATA;
  33. inline void InitializeMsxmlTLS()
  34. {
  35. extern struct TLSDATA * EnsureTlsData();
  36. (void) EnsureTlsData();
  37. }