Windows NT 4.0 source code leak
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.

55 lines
1.3 KiB

4 years ago
  1. /***********************************************************************
  2. * Microsoft (R) 32-Bit Incremental Linker
  3. *
  4. * Copyright (C) Microsoft Corp 1992-95. All rights reserved.
  5. *
  6. * File: dmalloc_.h
  7. *
  8. * File Comments:
  9. *
  10. * Private header file for dmalloc package
  11. *
  12. ***********************************************************************/
  13. typedef struct DMPRE // Prefix to allocated block
  14. {
  15. unsigned long ulPattern1;
  16. size_t cbUser;
  17. size_t ulNotCbUser;
  18. struct DMPRE *pdmpreNext;
  19. struct DMPRE *pdmprePrev;
  20. struct DMPRE *pdmpreCur;
  21. unsigned long ulChecksum;
  22. unsigned long ulPattern2;
  23. } DMPRE;
  24. typedef struct DMSUF // Suffix to allocated block
  25. {
  26. unsigned long ulPattern1;
  27. unsigned long ulPattern2;
  28. } DMSUF;
  29. #define PdmpreFromPvUser(pvUser) ((DMPRE *) pvUser - 1)
  30. #define PvUserFromPdmpre(pdmpre) ((void *) (pdmpre + 1))
  31. void InitBlockPdmpre(DMPRE *pdmpre, size_t cbUser);
  32. void CheckBlockPdmpre(DMPRE *pdmpre);
  33. void ClearBlockPdmpre(DMPRE *pdmpre);
  34. void UpdateLinksPdmpre(DMPRE *pdmpre);
  35. // Undefine macros from dmalloc.h that cover the C runtime
  36. #undef malloc
  37. #undef calloc
  38. #undef realloc
  39. #undef free
  40. #undef _strdup
  41. #undef _expand
  42. #undef _heapadd
  43. #undef _heapchk
  44. #undef _heapmin
  45. #undef _heapset
  46. #undef _heapwalk
  47. #undef _msize