kerneltest/e32test/mmu/d_gobble.cpp
changeset 259 57b9594f5772
parent 0 a41df078684a
child 257 3e88ff8f41d5
equal deleted inserted replaced
247:d8d70de2bd36 259:57b9594f5772
   165 	}
   165 	}
   166 
   166 
   167 TUint32 DGobbler::AllocMultiPage(TUint32 aSize)
   167 TUint32 DGobbler::AllocMultiPage(TUint32 aSize)
   168 	{
   168 	{
   169 	TUint32 sz = 1u << __e32_find_ms1_32(aSize);	// round size down to power of 2
   169 	TUint32 sz = 1u << __e32_find_ms1_32(aSize);	// round size down to power of 2
   170 	while (sz > iPageSize)
   170 	while (sz >= iPageSize)
   171 		{
   171 		{
   172 		TPhysAddr pa;
   172 		TPhysAddr pa;
   173 		TInt r = Epoc::AllocPhysicalRam(sz, pa);
   173 		TInt r = Epoc::AllocPhysicalRam(sz, pa);
   174 		if (r == KErrNone)
   174 		if (r == KErrNone)
   175 			return pa | __e32_find_ms1_32(sz);
   175 			return pa | __e32_find_ms1_32(sz);