kerneltest/e32test/heap/t_heapdb.cpp
branchRCL_3
changeset 43 c1f20ce4abcf
parent 0 a41df078684a
child 44 3e88ff8f41d5
--- a/kerneltest/e32test/heap/t_heapdb.cpp	Thu Aug 19 11:14:22 2010 +0300
+++ b/kerneltest/e32test/heap/t_heapdb.cpp	Tue Aug 31 16:34:26 2010 +0300
@@ -45,18 +45,28 @@
 #include <e32test.h>
 #include <e32def.h>
 #include <e32def_private.h>
+#include "dla.h"
+#include "slab.h"
+#include "page_alloc.h"
+#include "heap_hybrid.h"
+#define KHEAPCELLINFO RHybridHeap::SHeapCellInfo
 
 LOCAL_D RTest test(_L("T_HEAPDB"));
 
 #if defined(_DEBUG)
 
-RHeap::SHeapCellInfo CellInfo[4];
+KHEAPCELLINFO CellInfo[4];
 
 class RTestHeap : public RHeap
 	{
 public:
-	void AttachInfo(SHeapCellInfo* aInfo)
-		{iTestData = aInfo;}
+	void AttachInfo(KHEAPCELLINFO* aInfo)
+		{
+		RHybridHeap::STestCommand cmd;
+		cmd.iData = aInfo;
+		cmd.iCommand = RHybridHeap::ETestData;
+		DebugFunction(RHeap::EHybridHeap, (TAny*)&cmd);
+		}
 	};
 
 void AttachToHeap(RHeap* aHeap, TInt aInfo)
@@ -68,19 +78,17 @@
 
 void TestCellInfo(TInt aInfo, TInt aNest, TInt aAllocCount, TInt aLevelAlloc, TInt aSize, TAny* aAddr)
 	{
-	RHeap::SHeapCellInfo& ci = CellInfo[aInfo];
+	(void) aSize;
+	KHEAPCELLINFO& ci = CellInfo[aInfo];
 	RHeap::SDebugCell& cell = *ci.iStranded;
 	test(cell.nestingLevel == aNest);
 	test(cell.allocCount == aAllocCount);
 	test(ci.iLevelAlloc == aLevelAlloc);
-	test(cell.len == aSize + RHeap::EAllocCellSize);
 	test((&cell+1) == aAddr);
 	}
 
 const TInt KMaxFailureRate=100;
 const TInt KThreadMemError=-50;
-const TInt KCellSize=(sizeof(RHeap::SCell)); // Size of free cell header	
-const TInt KHeadSize=(sizeof(RHeap::SDebugCell)); // Size of allocated cell header with space for heaven info
 
 LOCAL_D TInt heapCount=1;
 LOCAL_D RSemaphore threadSemaphore;