diff -r a179b74831c9 -r c1f20ce4abcf kerneltest/e32test/heap/t_heapdb.cpp --- 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 #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;