avr/cpp/common/NewDelete.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  std

Typedefs

typedef unsigned int std::size_t
typedef void(*) std::new_handler ()

Functions

new_handler std::set_new_handler (new_handler) throw ()
void operator delete (void *) throw ()
void operator delete[] (void *) throw ()
void * operator new (std::size_t) throw ()
void * operator new[] (std::size_t) throw ()
void * malloc (std::size_t)
void free (void *)
void abort () __attribute__((noreturn))
void __cxa_pure_virtual ()

Variables

new_handler __new_handler


Function Documentation

void __cxa_pure_virtual (  ) 

Definition at line 88 of file NewDelete.cpp.

00089 {
00090     abort();
00091 }

void abort (  ) 

void free ( void *   ) 

void* malloc ( std::size_t   ) 

void operator delete ( void *   )  throw ()

Definition at line 77 of file NewDelete.cpp.

00078 {
00079   if (ptr)
00080     free (ptr);
00081 }

void operator delete[] ( void *   )  throw ()

Definition at line 83 of file NewDelete.cpp.

00084 {
00085   ::operator delete (ptr);
00086 }

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

Definition at line 53 of file NewDelete.cpp.

00054 {
00055     void *p;
00056     if (sz == 0)
00057         sz = 1;
00058     p = (void*) malloc(sz);
00059 
00060     while (p == 0)
00061     {
00062         new_handler handler = __new_handler;
00063         if (! handler)
00064             return 0;
00065         handler();
00066         p = (void *) malloc(sz);
00067     }
00068 
00069     return p;
00070 }

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

Definition at line 72 of file NewDelete.cpp.

00073 {
00074   return ::operator new(sz);
00075 }


Variable Documentation

new_handler __new_handler

Definition at line 51 of file NewDelete.cpp.


Generated on Sat Sep 15 23:41:46 2007 for AVR C++ Lib (common) by  doxygen 1.5.2
SourceForge.net Logo MTÜ TTÜ Robotiklubi