Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
Data Structures | Macros | Functions | Variables
18.support.dynamic.cpp File Reference
#include <new>
#include <memory>
#include <rw_driver.h>
#include <rw/_defs.h>
#include <rw/_error.h>
#include <cstdlib>
#include <cstring>
Include dependency graph for 18.support.dynamic.cpp:

Go to the source code of this file.

Data Structures

struct  MemoryAllocator
 

Macros

#define TEST_OP_THROWS(expr, cond, tag)
 
#define _RWSTD_NO_EXT_OPERATOR_NEW
 

Functions

void * operator new (std::size_t size) _THROWS((std
 
void operator delete (void *p) _THROWS(())
 
void my_unexpected_handler ()
 
void my_new_handler ()
 
int main (int argc, char *argv[])
 

Variables

void(* default_throw_proc )(int, char *) = _RW::__rw_throw_proc
 
bool my_throw_proc_called = false
 

Macro Definition Documentation

◆ _RWSTD_NO_EXT_OPERATOR_NEW

#define _RWSTD_NO_EXT_OPERATOR_NEW

◆ TEST_OP_THROWS

#define TEST_OP_THROWS (   expr,
  cond,
  tag 
)
Value:
_TRY { \
alloc._failAlloc = true; \
expr; \
rw_assert (cond, 0, __LINE__, tag); \
} \
_CATCH (std::bad_alloc) { \
RW_ASSERT (!cond, 0, __LINE__, tag); \
} \
_CATCH (...) { \
rw_assert (!cond, 0, __LINE__, tag); \
} \
(void)0
#define alloc
Definition 17.names.cpp:441
#define tag
Definition 17.names.cpp:551
#define _TRY
Definition _defs.h:850

Definition at line 155 of file 18.support.dynamic.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 471 of file 18.support.dynamic.cpp.

◆ my_new_handler()

void my_new_handler ( )

Definition at line 180 of file 18.support.dynamic.cpp.

◆ my_unexpected_handler()

void my_unexpected_handler ( )

Definition at line 174 of file 18.support.dynamic.cpp.

◆ operator delete()

void operator delete ( void *  p)

Definition at line 147 of file 18.support.dynamic.cpp.

◆ operator new()

void * operator new ( std::size_t  size)

Definition at line 142 of file 18.support.dynamic.cpp.

Variable Documentation

◆ default_throw_proc

void(* default_throw_proc) (int, char *) ( int  ,
char *   
) = _RW::__rw_throw_proc

Definition at line 185 of file 18.support.dynamic.cpp.

◆ my_throw_proc_called

bool my_throw_proc_called = false

Definition at line 187 of file 18.support.dynamic.cpp.