os/kernelhwsrv/kernel/eka/compsupp/rvct2_2/rtopnew.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 	}