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.

50 lines
1.2 KiB

  1. //============================================================================
  2. // Copyright (c) 1996, Microsoft Corporation
  3. //
  4. // File: mm.h
  5. //
  6. // History:
  7. // Abolade Gbadegesin Jan-26-1996 Created.
  8. //
  9. // Contains internal declarations for memory-management routines.
  10. //============================================================================
  11. #ifndef _MM_H_
  12. #define _MM_H_
  13. // struct: MMHEADER
  14. //
  15. // Describes an entry in the memory-managed heap.
  16. typedef struct _MMHEADER {
  17. LIST_ENTRY leLink;
  18. LARGE_INTEGER liTimeStamp;
  19. DWORD dwBlockSize;
  20. } MMHEADER, *PMMHEADER;
  21. // struct: MMHEAP
  22. //
  23. // Describes a memory-managed heap.
  24. // This consists of a critical section used to synchronize acces to the heap,
  25. // a busy list used to store headers for entries currently allocated,
  26. // and a free list used to store headers for recently de-allocated entries.
  27. // The busy list is sorted by the time of allocation, most-recent-first,
  28. // and the free list is sorted by size, smallest-first.
  29. typedef struct _MMHEAP {
  30. HANDLE hHeap;
  31. LIST_ENTRY lhFreeList;
  32. LIST_ENTRY lhBusyList;
  33. CRITICAL_SECTION csListLock;
  34. } MMHEAP, *PMMHEAP;
  35. #endif // _MM_H_