error in use of operator "new" with rtems
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Mar 4 16:15:08 UTC 2013
On 03/04/2013 04:59 PM, Peter Dufault wrote:
> If you aren't using exceptions (and in a small footprint project you probably are not and are compiling to disable them) you can provide your own new and delete operators as wrappers around malloc() and free() and check your return codes as you would from malloc() and free().
You can also use the no-throw new operator:
#include <new>
int *f()
{
return new(std::nothrow) int;
}
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list