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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2904
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
1 // This file is part of the uSTL library, an STL implementation.
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
2 //
3152
4885e0722884 * include/*:
sergeig
parents: 2904
diff changeset
3 // Copyright (c) 2005 by Mike Sharov <msharov@users.sourceforge.net>
2904
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
4 // This file is free software, distributed under the MIT License.
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
5
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
6 #include "unew.h"
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
7
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
8 void* tmalloc (size_t n) throw (ustl::bad_alloc)
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
9 {
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
10 void* p = malloc (n);
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
11 if (!p)
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
12 USTL_THROW(ustl::bad_alloc (n));
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
13 return (p);
88af52c64ce4 * ecos.db: Add uSTL library package record.
jld
parents:
diff changeset
14 }