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.

39 lines
855 B

  1. // memmgr.h
  2. //
  3. // This file contains declarations and macros for memory management.
  4. // Implementation details may change so beware of relying on internal details.
  5. #ifndef __INCLUDE_MEMMGR
  6. #define __INCLUDE_MEMMGR
  7. #ifdef __cplusplus
  8. extern "C"
  9. {
  10. #endif
  11. void *ExternAlloc(DWORD cb);
  12. void *ExternRealloc(void *pv, DWORD cb);
  13. void ExternFree(void *pv);
  14. char *Externstrdup( const char *strSource );
  15. wchar_t *Externwcsdup(const wchar_t *wszSource);
  16. #ifdef DBG
  17. typedef struct MEMORY_MANAGER {
  18. int iCookie; // Tag to verify pointer to memory manager
  19. int cAllocMem; // Amount of memory alloced
  20. int cAlloc; // Count of allocs outstanding
  21. int cAllocMaxMem; // Max amount of memory ever alloced.
  22. } MEMORY_MANAGER;
  23. extern MEMORY_MANAGER g_theMemoryManager;
  24. #endif
  25. #ifdef __cplusplus
  26. };
  27. #endif
  28. #endif //__INCLUDE_MEMMGR