ReactOS 0.4.16-dev-2104-gb84fa49
new_nothrow.cpp File Reference
#include <new>
Include dependency graph for new_nothrow.cpp:

Go to the source code of this file.

Functions

voidoperator new (std::size_t) throw (std::bad_alloc)
 
voidoperator new[] (std::size_t) throw (std::bad_alloc)
 
voidoperator new (std::size_t size, const std::nothrow_t &nothrow_constant) throw ()
 
voidoperator new[] (std::size_t size, const std::nothrow_t &nothrow_constant) throw ()
 

Function Documentation

◆ operator new() [1/2]

void * operator new ( std::size_t  size,
const std::nothrow_t &  nothrow_constant 
)
throw (
)

Definition at line 15 of file new_nothrow.cpp.

16{
17 try
18 {
19 return operator new (size);
20 }
21 catch (std::bad_alloc)
22 {
23 return NULL;
24 }
25}
#define NULL
Definition: types.h:112
GLsizeiptr size
Definition: glext.h:5919

◆ operator new() [2/2]

void * operator new ( std::size_t  uSize)
throw (std::bad_alloc
)

Definition at line 63 of file chstring.cpp.

64{
65 void* Buffer;
66
67 Buffer = malloc(uSize);
68 if (!Buffer)
69 {
70 throw HeapException;
71 }
72
73 return Buffer;
74}
CHeap_Exception HeapException(CHeap_Exception::E_ALLOCATION_ERROR)
Definition: bufpool.h:45
#define malloc
Definition: debug_ros.c:4

◆ operator new[]() [1/2]

void * operator new[] ( std::size_t  size,
const std::nothrow_t &  nothrow_constant 
)
throw (
)

Definition at line 27 of file new_nothrow.cpp.

28{
29 try
30 {
31 return operator new[] (size);
32 }
33 catch (std::bad_alloc)
34 {
35 return NULL;
36 }
37}

◆ operator new[]() [2/2]

void * operator new[] ( std::size_t  size)
throw (std::bad_alloc
)

Definition at line 223 of file nc_alloc.cpp.

223 {
224 return OperatorNew( size );
225}
static void * OperatorNew(size_t s)
Definition: nc_alloc.cpp:183