Leaked source code of windows server 2003
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.

53 lines
688 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. memory.hxx
  6. Abstract:
  7. Allocator class.
  8. Author:
  9. Felix Maxa (amaxa) 31-Oct-2000
  10. --*/
  11. #ifndef _TALLOCATOR_HXX_
  12. #define _TALLOCATOR_HXX_
  13. class TAllocator
  14. {
  15. public:
  16. TAllocator(
  17. IN DWORD Options = HEAP_NO_SERIALIZE,
  18. IN SIZE_T InitialSize = 0x1000
  19. );
  20. ~TAllocator(
  21. VOID
  22. );
  23. PVOID
  24. AllocMem(
  25. SIZE_T const cbSize
  26. );
  27. VOID
  28. FreeMem(
  29. VOID *CONST pMem
  30. );
  31. private:
  32. HANDLE m_hHeap;
  33. DWORD m_Options;
  34. SIZE_T m_InitialSize;
  35. };
  36. #endif