alternative Standard Libary  0.29.8
new.cpp-Dateireferenz
+ Include-Abhängigkeitsdiagramm für new.cpp:

gehe zum Quellcode dieser Datei

Funktionen

void * xmalloc (unsigned int n)
 
void xfree (void *p)
 
void * operator new (unsigned int n)
 
void * operator new[] (unsigned int n)
 
void operator delete (void *p)
 
void operator delete[] (void *p)
 
void * operator new (unsigned int, void *p)
 
void * operator new[] (unsigned int, void *p)
 
void operator delete (void *, void *)
 
void operator delete[] (void *, void *)
 
void operator delete (void *p, unsigned int)
 
void operator delete[] (void *p, unsigned int)
 
std::new_handler set_new_handler (std::new_handler new_p)
 
std::new_handler get_new_handler ()
 

Variablen

std::new_handler handler = NULL
 

Dokumentation der Funktionen

◆ get_new_handler()

std::new_handler get_new_handler ( )
93 {
94  return handler;
95 }
std::new_handler handler
Definition: new.cpp:27

◆ operator delete() [1/3]

void operator delete ( void *  p)
56 {
57  xfree (p);
58 }
void xfree(void *p)
Definition: new.cpp:32

◆ operator delete() [2/3]

void operator delete ( void *  ,
void *   
)
73 {
74 }

◆ operator delete() [3/3]

void operator delete ( void *  p,
unsigned  int 
)
79 {
80  xfree (p);
81 }
void xfree(void *p)
Definition: new.cpp:32

◆ operator delete[]() [1/3]

void operator delete[] ( void *  p)
60 {
61  xfree (p);
62 }
void xfree(void *p)
Definition: new.cpp:32

◆ operator delete[]() [2/3]

void operator delete[] ( void *  ,
void *   
)
76 {
77 }

◆ operator delete[]() [3/3]

void operator delete[] ( void *  p,
unsigned  int 
)
83 {
84  xfree (p);
85 }
void xfree(void *p)
Definition: new.cpp:32

◆ operator new() [1/2]

void* operator new ( unsigned int  n)
36 {
37  void *nn = xmalloc(n);
38 
39  if((nn == NULL && handler != NULL))
40  {
41  handler();
42  }
43  return nn;
44 }
std::new_handler handler
Definition: new.cpp:27
void * xmalloc(unsigned int n)
Definition: new.cpp:29

◆ operator new() [2/2]

void* operator new ( unsigned  int,
void *  p 
)
64 {
65  return (p);
66 }

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

void* operator new[] ( unsigned int  n)
46 {
47  void *nn = xmalloc(n);
48 
49  if((nn == NULL && handler != NULL))
50  {
51  handler();
52  }
53  return nn;
54 }
std::new_handler handler
Definition: new.cpp:27
void * xmalloc(unsigned int n)
Definition: new.cpp:29

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

void* operator new[] ( unsigned  int,
void *  p 
)
68 {
69  return (p);
70 }

◆ set_new_handler()

std::new_handler set_new_handler ( std::new_handler  new_p)
87 {
89  handler = new_p;
90  return old;
91 }
void(* new_handler)()
Definition: new.hpp:52
std::new_handler handler
Definition: new.cpp:27

◆ xfree()

void xfree ( void *  p)
32  {
33  std::Sys::mFree (p);
34 }
static void mFree(void *mem)
Definition: PLATFORM.cpp:117

◆ xmalloc()

void* xmalloc ( unsigned int  n)
29  {
30  return (std::Sys::mAlloc (n));
31 }
static void * mAlloc(size_t size)
Definition: PLATFORM.cpp:111

Variablen-Dokumentation

◆ handler

std::new_handler handler = NULL