Source code of Windows XP (NT5)
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.

65 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. memtrace.h
  5. Abstract:
  6. This function contains an extension to NTSD that allows tracing of
  7. memory usage when ULIB objects are compiled with the MEMLEAK flag
  8. defined.
  9. Author:
  10. Barry Gilhuly (W-Barry) 25-July-91
  11. Revision History:
  12. --*/
  13. //
  14. // The following was ripped off from ULIBDEF.HXX and NEWDELP.HXX
  15. //
  16. #define CONST const
  17. typedef ULONG MEM_BLOCKSIG;
  18. //
  19. // MEM_BLOCK header signature type and value.
  20. //
  21. CONST MEM_BLOCKSIG Signature = 0xDEADDEAD;
  22. //
  23. // Maximum length of caller's file name.
  24. //
  25. #define MaxFileLength 20
  26. //
  27. // Maximum size of call stack recorded.
  28. //
  29. #define MaxCallStack 20
  30. //
  31. // MEM_BLOCK is the header attached to all allocated memory blocks.
  32. // Do not change the order of these fields without fixing the initialization
  33. // of the dummy MEM_BLOCK in newdel.cxx.
  34. //
  35. typedef struct _MEM_BLOCK {
  36. struct _MEM_BLOCK* pmemNext;
  37. struct _MEM_BLOCK* pmemPrev;
  38. MEM_BLOCKSIG memsig;
  39. ULONG line;
  40. ULONG size;
  41. char file[ MaxFileLength ];
  42. DWORD call[ MaxCallStack ];
  43. } MEM_BLOCK, *PMEM_BLOCK;
  44. //
  45. // File handle for data destination...
  46. //
  47. HANDLE hFile;