kernel/eka/memmodel/epoc/flexible/mmu/mmapping.cpp
changeset 90 947f0dc9f7a8
parent 39 5d2844f35677
equal deleted inserted replaced
52:2d65c2f76d7b 90:947f0dc9f7a8
  1305 		{
  1305 		{
  1306 		TInt r = DFineMapping::Construct(	EMemoryAttributeStandard, 
  1306 		TInt r = DFineMapping::Construct(	EMemoryAttributeStandard, 
  1307 											EMappingCreateDefault, 
  1307 											EMappingCreateDefault, 
  1308 											KKernelOsAsid, 
  1308 											KKernelOsAsid, 
  1309 											0, 
  1309 											0, 
  1310 											aCount, 
  1310 											aCount << KPageShift, 
  1311 											0);
  1311 											0);
  1312 		if (r != KErrNone)
  1312 		if (r != KErrNone)
  1313 			return r;
  1313 			return r;
  1314 		}
  1314 		}
  1315 	// Map the memory, this will pin it first then map it.
  1315 	// Map the memory, this will pin it first then map it.
  1433 
  1433 
  1434 DVirtualPinMapping* DVirtualPinMapping::New(TUint aMaxCount)
  1434 DVirtualPinMapping* DVirtualPinMapping::New(TUint aMaxCount)
  1435 	{
  1435 	{
  1436 	TRACE(("DVirtualPinMapping::New(0x%x)",aMaxCount));
  1436 	TRACE(("DVirtualPinMapping::New(0x%x)",aMaxCount));
  1437 	DVirtualPinMapping* self = new DVirtualPinMapping;
  1437 	DVirtualPinMapping* self = new DVirtualPinMapping;
  1438 	if(aMaxCount)
  1438 	if(self && aMaxCount)
  1439 		{
  1439 		{
  1440 		// pages have been reserved for our use.
  1440 		// pages have been reserved for our use.
  1441 
  1441 
  1442 		// Create the array for storing pinned paged tables now, so we
  1442 		// Create the array for storing pinned paged tables now, so we
  1443 		// don't risk out-of-memory errors trying to do so later...
  1443 		// don't risk out-of-memory errors trying to do so later...