kernel/eka/compsupp/rvct2_2/rtopnew.cpp
changeset 266 0008ccd16016
parent 259 57b9594f5772
child 272 70a6efdb753f
child 281 13fbfa31d2ba
equal deleted inserted replaced
259:57b9594f5772 266:0008ccd16016
     1 // Copyright (c) 2005-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 //
       
    15 
       
    16 #include <e32std.h>
       
    17 #include <e32std_private.h>
       
    18 
       
    19 EXPORT_C TAny* operator new(TUint aSize) __NO_THROW
       
    20 //
       
    21 // The global new operator.
       
    22 //
       
    23 	{
       
    24 
       
    25 	return(User::Alloc(aSize));
       
    26 	}
       
    27 
       
    28 EXPORT_C TAny* operator new[](TUint aSize) __NO_THROW
       
    29 	{
       
    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 
       
    55 	return(User::Alloc(aSize+anExtraSize));
       
    56 	}