kernel/eka/memmodel/epoc/flexible/mmu/maddressspace.cpp
branchRCL_3
changeset 257 3e88ff8f41d5
parent 256 c1f20ce4abcf
equal deleted inserted replaced
256:c1f20ce4abcf 257:3e88ff8f41d5
   243 
   243 
   244 void DAddressSpace::FreeVirtualMemory(TLinAddr aAddr, TUint aSize)
   244 void DAddressSpace::FreeVirtualMemory(TLinAddr aAddr, TUint aSize)
   245 	{
   245 	{
   246 	TRACE(("DAddressSpace::FreeVirtualMemory(0x%08x,0x%08x) osAsid=%d",aAddr, aSize, iOsAsid));
   246 	TRACE(("DAddressSpace::FreeVirtualMemory(0x%08x,0x%08x) osAsid=%d",aAddr, aSize, iOsAsid));
   247 	Lock();
   247 	Lock();
   248 	TBool global = iOsAsid==(TInt)KKernelOsAsid && UserGlobalVirtualAllocator.InRange(aAddr,aSize);
   248 	if(iOsAsid==(TInt)KKernelOsAsid && UserGlobalVirtualAllocator.InRange(aAddr,aSize))
   249 	if(global)
       
   250 		UserGlobalVirtualAllocator.Free(aAddr,aSize);
   249 		UserGlobalVirtualAllocator.Free(aAddr,aSize);
   251 	else
   250 	else
       
   251 		{
   252 		iVirtualAllocator.Free(aAddr,aSize);
   252 		iVirtualAllocator.Free(aAddr,aSize);
   253 	Unlock();
       
   254 	if (!global)
       
   255 		AsyncClose();
   253 		AsyncClose();
       
   254 		}
       
   255 	Unlock();
   256 	}
   256 	}
   257 
   257 
   258 
   258 
   259 TInt DAddressSpace::AllocateUserCommonVirtualMemory(TLinAddr& aAddr, TUint& aSize, TLinAddr aRequestedAddr, TUint aRequestedSize, TUint aPdeType)
   259 TInt DAddressSpace::AllocateUserCommonVirtualMemory(TLinAddr& aAddr, TUint& aSize, TLinAddr aRequestedAddr, TUint aRequestedSize, TUint aPdeType)
   260 	{
   260 	{