summaryrefslogtreecommitdiff
path: root/ecos/packages/language/cxx/ustl/current/src/unew.cpp
blob: 139371d686165cd21f8e60b55db879c349f5360e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// This file is part of the uSTL library, an STL implementation.
//
// Copyright (c) 2005 by Mike Sharov <msharov@users.sourceforge.net>
// This file is free software, distributed under the MIT License.

#include "unew.h"

void* tmalloc (size_t n) throw (ustl::bad_alloc)
{
    void* p = malloc (n);
    if (!p)
	USTL_THROW(ustl::bad_alloc (n));
    return (p);
}