diff -r a232af6b0b1f -r a5496987b1da kerneltest/e32test/heap/t_heapdb.cpp --- a/kerneltest/e32test/heap/t_heapdb.cpp Wed Jun 23 12:58:21 2010 +0100 +++ b/kerneltest/e32test/heap/t_heapdb.cpp Thu Jul 01 17:57:33 2010 +0100 @@ -45,18 +45,28 @@ #include #include #include +#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;