Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members

CustomNew.cpp File Reference

Overloaded global operators new and delete. More...

#include <PalmOS.h>
#include "Device.h"
#include "MemLeak.h"

Include dependency graph for CustomNew.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void* operator new (UInt32 size)
 Operator new that panics instead of throwing std::bad_alloc. More...

void* operator new[] (UInt32 size)
 Operator new that panics instead of throwing std::bad_alloc. More...

void operator delete (void* p)
 Operator delete that is compatible with the customized operators new. More...

void operator delete[] (void* p)
 Operator delete that is compatible with the customized operators new. More...


Detailed Description

Overloaded global operators new and delete.

The default operators throw an std:bad_alloc exception, which requires C++ exception handling to be enabled. The customized versions will invoke Device::panic() in case of insufficient memory.

Definition in file CustomNew.cpp.


Function Documentation

void operator delete ( void * p )
 

Operator delete that is compatible with the customized operators new.

Definition at line 78 of file CustomNew.cpp.

void operator delete[] ( void * p )
 

Operator delete that is compatible with the customized operators new.

Definition at line 90 of file CustomNew.cpp.

void * operator new ( UInt32 size )
 

Operator new that panics instead of throwing std::bad_alloc.

Definition at line 42 of file CustomNew.cpp.

void * operator new[] ( UInt32 size )
 

Operator new that panics instead of throwing std::bad_alloc.

Definition at line 60 of file CustomNew.cpp.


Razor! Engine Developer's Guide. Copyright © by Tilo Christ. All Rights Reserved. Last updated: 4 Nov 2000