2022-02-28 20:08:14 +01:00
|
|
|
// 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)
|
|
|
|
{
|
|
|
|
void* p = malloc (n);
|
2022-03-01 20:28:56 +01:00
|
|
|
if (!p)
|
|
|
|
return nullptr; // throw ustl::bad_alloc (n);
|
|
|
|
return p;
|
2022-02-28 20:08:14 +01:00
|
|
|
}
|
2022-03-01 20:28:56 +01:00
|
|
|
|