kerneltest/e32test/heap/t_heap.cpp
branchCompilerCompatibility
changeset 77 c4d65d91ad0c
parent 62 4a8fed1c0ef6
child 109 b3a1d9898418
equal deleted inserted replaced
74:741dcdf88ba9 77:c4d65d91ad0c
   527 	// stays as 16 but resize as 8 will resize to 8
   527 	// stays as 16 but resize as 8 will resize to 8
   528 
   528 
   529 	for(TInt aSize2=(TInt)pHeap->AllocLen(aCell); aSize2>=0; aSize2--)
   529 	for(TInt aSize2=(TInt)pHeap->AllocLen(aCell); aSize2>=0; aSize2--)
   530 		{
   530 		{
   531 		test(pHeap->ReAlloc(aCell, aSize2)!=NULL);
   531 		test(pHeap->ReAlloc(aCell, aSize2)!=NULL);
   532 		test(((TInt)pHeap->AllocLen(aCell)>=aSize2)&&((TInt)pHeap->AllocLen(aCell)<=aSize2+KMinFreeSize));
   532 
       
   533 		test((TInt)pHeap->AllocLen(aCell)>=aSize2);		
       
   534 
       
   535 		TInt aTmpSize2 = Max(_ALIGN_UP(aSize2 + RHeap::EAllocCellSize, KAlign), KMinFreeSize);
       
   536 
       
   537 		test((TInt)pHeap->AllocLen(aCell)<=aTmpSize2+KMinFreeSize);		
   533 		}
   538 		}
   534   
   539   
   535 	pHeap->Check();
   540 	pHeap->Check();
   536 	pHeap->Reset();
   541 	pHeap->Reset();
   537 	// Allocate a block, fill with data, allocate another block or two then resize the original
   542 	// Allocate a block, fill with data, allocate another block or two then resize the original