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.

52 lines
1.3 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993.
  5. //
  6. // File: bm_alloc.hxx
  7. //
  8. // Contents: IMalloc test class definition
  9. //
  10. // Classes: COleAllocTest
  11. //
  12. // Functions:
  13. //
  14. // History: 29-July-93 t-martig Created
  15. //
  16. //--------------------------------------------------------------------------
  17. #ifndef _BM_ALLOC_HXX_
  18. #define _BM_ALLOC_HXX_
  19. #include <bm_base.hxx>
  20. #define MAX_SIZE_CNT 15
  21. class COleAllocTest : public CTestBase
  22. {
  23. public:
  24. virtual TCHAR *Name ();
  25. virtual SCODE Setup (CTestInput *input);
  26. virtual SCODE Run ();
  27. virtual SCODE Report (CTestOutput &OutputFile);
  28. virtual SCODE Cleanup ();
  29. private:
  30. ULONG m_ulIterations;
  31. ULONG m_ulSize;
  32. IMalloc *m_pMalloc;
  33. // times for the various IMalloc calls
  34. ULONG m_ulAllocTime[TEST_MAX_ITERATIONS];
  35. ULONG m_ulFreeTime[TEST_MAX_ITERATIONS];
  36. ULONG m_ulReallocTime[TEST_MAX_ITERATIONS];
  37. ULONG m_ulGetSizeTime[TEST_MAX_ITERATIONS];
  38. ULONG m_ulDidAllocTime[TEST_MAX_ITERATIONS];
  39. ULONG m_ulHeapMinimizeTime[TEST_MAX_ITERATIONS];
  40. // times for allocations of various sizes
  41. ULONG m_ulAllocSizeTime[MAX_SIZE_CNT][TEST_MAX_ITERATIONS];
  42. ULONG m_ulFreeSizeTime[MAX_SIZE_CNT][TEST_MAX_ITERATIONS];
  43. };
  44. #endif