equal
deleted
inserted
replaced
733 // Check to make sure a free cell was found. |
733 // Check to make sure a free cell was found. |
734 bool freeCellFound = index < maxPreallocatedActivities; |
734 bool freeCellFound = index < maxPreallocatedActivities; |
735 if(!freeCellFound) |
735 if(!freeCellFound) |
736 { |
736 { |
737 MESH_LOG((KMeshMachineSubTag, _L8("ERROR AMMNodeBase %08x:\tBorrowPreallocatedSpace - All %d preallocation cells have been allocated!"), this, maxPreallocatedActivities)); |
737 MESH_LOG((KMeshMachineSubTag, _L8("ERROR AMMNodeBase %08x:\tBorrowPreallocatedSpace - All %d preallocation cells have been allocated!"), this, maxPreallocatedActivities)); |
738 __ASSERT_ALWAYS(freeCellFound, User::Panic(KMMNodePanic, EPanicPreallocatedSpaceAlreadyTaken)); |
738 __ASSERT_DEBUG(freeCellFound, User::Panic(KMMNodePanic, EPanicPreallocatedSpaceAlreadyTaken)); |
|
739 // Attempt to allocate some space from the heap now in a last attempt to continue processing. |
|
740 TRAPD(err,ptr = User::AllocL(aSize)); |
|
741 __ASSERT_ALWAYS(err, User::Panic(KMessagesPanic, EPreAllocationFailedPanic)); |
739 } |
742 } |
740 |
743 |
741 return ptr; |
744 return ptr; |
742 } |
745 } |
743 |
746 |
764 bool allocatedCellFound = index < maxPreallocatedActivities; |
767 bool allocatedCellFound = index < maxPreallocatedActivities; |
765 if(!allocatedCellFound) |
768 if(!allocatedCellFound) |
766 { |
769 { |
767 MESH_LOG((KMeshMachineSubTag, _L8("ERROR AMMNodeBase %08x:\tReturnPreallocatedSpace - the returned pointer 0x%08X is invalid!"), this, aSpace)); |
770 MESH_LOG((KMeshMachineSubTag, _L8("ERROR AMMNodeBase %08x:\tReturnPreallocatedSpace - the returned pointer 0x%08X is invalid!"), this, aSpace)); |
768 __ASSERT_DEBUG(allocatedCellFound, User::Panic(KMMNodePanic, EPanicPreallocatedSpaceReturnedOther)); |
771 __ASSERT_DEBUG(allocatedCellFound, User::Panic(KMMNodePanic, EPanicPreallocatedSpaceReturnedOther)); |
|
772 // May be returning a cell which was created in error recovery section of the Borrow in which case if must be "free"d. |
|
773 User::Free(aSpace); |
769 } |
774 } |
770 } |
775 } |
771 |
776 |
772 |
777 |
773 //-========================================================= |
778 //-========================================================= |