kerneltest/e32test/heap/t_hcomp.cpp
branchRCL_3
changeset 44 3e88ff8f41d5
parent 43 c1f20ce4abcf
equal deleted inserted replaced
43:c1f20ce4abcf 44:3e88ff8f41d5
    37 
    37 
    38 	RHeap* heap1=User::ChunkHeap(NULL,size64k,heapsize+size64k);
    38 	RHeap* heap1=User::ChunkHeap(NULL,size64k,heapsize+size64k);
    39 	if (heap1==NULL)
    39 	if (heap1==NULL)
    40 		return KErrNoMemory;
    40 		return KErrNoMemory;
    41 
    41 
    42 	// Need this horrible construct because RVCT4 complains that the return is
    42 	FOREVER
    43 	// unreachable code.  Without it, though, other code analysers will complain
       
    44 	// that there is a missing return value!	
       
    45 	volatile TInt forever = 1;
       
    46 	
       
    47 	while(forever)
       
    48 		{
    43 		{
    49 		TUint8* ptr=(TUint8*)heap1->Alloc(heapsize);	// fail, compress, fail
    44 		TUint8* ptr=(TUint8*)heap1->Alloc(heapsize);	// fail, compress, fail
    50 		User::After(1000);	// quite soon
    45 		User::After(1000);	// quite soon
    51 		heap1->Free(ptr);
    46 		heap1->Free(ptr);
    52 		}
    47 		}