kerneltest/e32test/heap/t_heap.cpp
branchRCL_3
changeset 19 4a8fed1c0ef6
parent 0 a41df078684a
child 43 c1f20ce4abcf
equal deleted inserted replaced
15:2d65c2f76d7b 19:4a8fed1c0ef6
   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