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.

77 lines
892 B

  1. #ifndef _MEMORY_H_INCLUDED_
  2. #define _MEMORY_H_INCLUDED_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. LPVOID
  7. ReallocPolMem(
  8. LPVOID pOldMem,
  9. DWORD cbOld,
  10. DWORD cbNew
  11. );
  12. DWORD
  13. AllocatePolString(
  14. LPWSTR pszString,
  15. LPWSTR * ppszNewString
  16. );
  17. void
  18. FreePolString(
  19. LPWSTR pszString
  20. );
  21. #if DBG
  22. extern LIST_ENTRY ADsMemList ;
  23. extern CRITICAL_SECTION ADsMemCritSect ;
  24. VOID InitPolMem(
  25. VOID
  26. ) ;
  27. VOID AssertPolMemLeaks(
  28. VOID
  29. ) ;
  30. VOID
  31. DumpMemoryTracker();
  32. #else
  33. #define InitPolMem()
  34. #define AssertPolMemLeaks()
  35. #define DumpMemoryTracker()
  36. #endif
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. /*
  41. inline void * _CRTAPI1
  42. operator new(size_t size)
  43. {
  44. return AllocPolMem(size);
  45. }
  46. inline void _CRTAPI1
  47. operator delete(void * pv)
  48. {
  49. FreePolMem(pv);
  50. }*/
  51. #endif // _MEMORY_H_INCLUDED_