Update contrib.
1 // Copyright (c) 1998-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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #include <stdlib.h> //size_t
21 // We use the EPOC32 memory allocation which is already
22 // thread-safe, so we don't need the _malloc_r variants
26 EXPORT_C void* malloc (size_t nbytes)
28 if (nbytes >= (KMaxTInt/2))
34 TAny *Tptr = User::Alloc(nbytes);
41 EXPORT_C void* realloc (void *p, size_t nbytes)
43 if (nbytes >= (KMaxTInt/2))
49 TAny *Tptr = User::ReAlloc(p, nbytes);
56 EXPORT_C void free (void *p)