kerneltest/e32test/heap/t_hcomp.cpp
changeset 109 b3a1d9898418
parent 0 a41df078684a
child 257 3e88ff8f41d5
equal deleted inserted replaced
102:ef2a444a7410 109:b3a1d9898418
    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 	FOREVER
    42 	// Need this horrible construct because RVCT4 complains that the return is
       
    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)
    43 		{
    48 		{
    44 		TUint8* ptr=(TUint8*)heap1->Alloc(heapsize);	// fail, compress, fail
    49 		TUint8* ptr=(TUint8*)heap1->Alloc(heapsize);	// fail, compress, fail
    45 		User::After(1000);	// quite soon
    50 		User::After(1000);	// quite soon
    46 		heap1->Free(ptr);
    51 		heap1->Free(ptr);
    47 		}
    52 		}