annotate packages/language/cxx/ustl/current/src/unew.cpp @ 3152:4885e0722884
* include/*:
* src/*:
* tests/*:
* HISTORY:
* LICENSE: Updated to uSTL 1.6 sources.
| author |
sergeig |
| date |
Wed, 04 Apr 2012 18:51:57 +0000 |
| parents |
88af52c64ce4 |
| children |
|
| rev |
line source |
|
2904
|
1 // This file is part of the uSTL library, an STL implementation. |
|
|
2 // |
|
3152
|
3 // Copyright (c) 2005 by Mike Sharov <msharov@users.sourceforge.net> |
|
2904
|
4 // This file is free software, distributed under the MIT License. |
|
|
5 |
|
|
6 #include "unew.h" |
|
|
7 |
|
|
8 void* tmalloc (size_t n) throw (ustl::bad_alloc) |
|
|
9 { |
|
|
10 void* p = malloc (n); |
|
|
11 if (!p) |
|
|
12 USTL_THROW(ustl::bad_alloc (n)); |
|
|
13 return (p); |
|
|
14 } |