Mercurial > ecos
diff packages/language/cxx/ustl/current/src/unew.cpp @ 2904:88af52c64ce4
* ecos.db: Add uSTL library package record.
* language/cxx/ustl/*: Initial check-in of the port of uSTL 1.3 to eCos
contributed by Uwe Kindler.
| author | jld |
|---|---|
| date | Thu, 20 Aug 2009 17:00:30 +0000 |
| parents | |
| children | 4885e0722884 |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/packages/language/cxx/ustl/current/src/unew.cpp @@ -0,0 +1,14 @@ +// This file is part of the uSTL library, an STL implementation. +// +// Copyright (c) 2005-2009 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); +}
