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.

73 lines
1.1 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. newdelp.hxx
  5. Abstract:
  6. This module contains the private definitions used by Ulib's
  7. implementation of the new and delete operators and the CRT's malloc,
  8. calloc, realloc and free functions.
  9. Author:
  10. David J. Gilman (davegi) 07-Dec-1990
  11. Environment:
  12. ULIB, User Mode
  13. --*/
  14. //
  15. // MEM_BLOCK header signature type and value.
  16. //
  17. DEFINE_TYPE( ULONG, MEM_BLOCKSIG );
  18. CONST MEM_BLOCKSIG Signature = 0xDEADDEAD;
  19. //
  20. // Maximum length of caller's file name.
  21. //
  22. CONST ULONG MaxFileLength = 20;
  23. //
  24. // Maximum size of call stack recorded.
  25. //
  26. CONST ULONG MaxCallStack = 20;
  27. //
  28. // MEM_BLOCK is the header attached to all allocated memory blocks.
  29. // Do not change the order of these fields without fixing the initialization
  30. // of the dummy MEM_BLOCK in newdel.cxx.
  31. //
  32. struct _MEM_BLOCK {
  33. _MEM_BLOCK* pmemNext;
  34. _MEM_BLOCK* pmemPrev;
  35. MEM_BLOCKSIG memsig;
  36. ULONG line;
  37. ULONG size;
  38. STR file[ MaxFileLength ];
  39. DWORD call[ MaxCallStack ];
  40. };
  41. DEFINE_TYPE( struct _MEM_BLOCK, MEM_BLOCK );
  42. //
  43. // Returns the root of the stack frame list.
  44. //
  45. extern "C" {
  46. VOID
  47. DoStackTrace(
  48. DWORD CallStack[]
  49. );
  50. };