kernel/eka/compsupp/symcpp/rtopnew.cpp
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "ARM EABI LICENCE.txt"
       
     5 // which accompanies this distribution, and is available
       
     6 // in kernel/eka/compsupp.
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This file is part of scppnwdl.dll.
       
    15 // 
       
    16 //
       
    17 
       
    18 #include <e32std.h>
       
    19 #include <e32std_private.h>
       
    20 
       
    21 EXPORT_C TAny* operator new(TUint aSize) __NO_THROW
       
    22 //
       
    23 // The global new operator.
       
    24 //
       
    25 	{
       
    26 	return User::Alloc(aSize);
       
    27 	}
       
    28 
       
    29 EXPORT_C TAny* operator new[](TUint aSize) __NO_THROW
       
    30 	{
       
    31 	return User::Alloc(aSize);
       
    32 	}
       
    33 
       
    34 EXPORT_C TAny* operator new(TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW
       
    35 //
       
    36 // The global new operator.
       
    37 //
       
    38 	{
       
    39 	(void) aNoThrow;
       
    40 	return User::Alloc(aSize);
       
    41 	}
       
    42 
       
    43 EXPORT_C TAny* operator new[](TUint aSize, const std::nothrow_t& aNoThrow) __NO_THROW
       
    44 	{
       
    45 	(void) aNoThrow;
       
    46 	return User::Alloc(aSize);
       
    47 	}
       
    48 
       
    49 EXPORT_C TAny* operator new(TUint aSize,TUint anExtraSize) __NO_THROW
       
    50 //
       
    51 // Allocate the requested size plus the extra.
       
    52 //
       
    53 	{
       
    54 	return User::Alloc(aSize + anExtraSize);
       
    55 	}