sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "ARM EABI LICENCE.txt" sl@0: // which accompanies this distribution, and is available sl@0: // in kernel/eka/compsupp. sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // This file is part of scppnwdl.dll. sl@0: // sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: sl@0: EXPORT_C TAny* operator new(TUint aSize) __NO_THROW sl@0: // sl@0: // The global new operator. sl@0: // sl@0: { sl@0: return User::Alloc(aSize); sl@0: } sl@0: sl@0: EXPORT_C TAny* operator new[](TUint aSize) __NO_THROW sl@0: { sl@0: return User::Alloc(aSize); sl@0: } sl@0: sl@0: EXPORT_C TAny* operator new(TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW sl@0: // sl@0: // The global new operator. sl@0: // sl@0: { sl@0: (void) aNoThrow; sl@0: return User::Alloc(aSize); sl@0: } sl@0: sl@0: EXPORT_C TAny* operator new[](TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW sl@0: { sl@0: (void) aNoThrow; sl@0: return User::Alloc(aSize); sl@0: } sl@0: sl@0: EXPORT_C TAny* operator new(TUint aSize,TUint anExtraSize) __NO_THROW sl@0: // sl@0: // Allocate the requested size plus the extra. sl@0: // sl@0: { sl@0: return User::Alloc(aSize + anExtraSize); sl@0: }