Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Overloading operator new()???: (2 Items)
   
Overloading operator new()???  
Happy Holidays All - 

Our team is considering overloading the new() operator to ensure that a NULL pointer is returned if/when the system is 
out of memory. Currently, even with exceptions disabled, new() throws a std::out_of_memory exception, which is 
undesirable for us...

My question is this: Is there a "best place" to overload operator new() for the entire system?

Thanks!

MikeZ
RE: Overloading operator new()???  
Google pointed me to :

http://gcc.gnu.org/ml/gcc/1999-02n/msg01370.html

________________________________________
From: Mike Zinni [community-noreply@qnx.com]
Sent: Tuesday, December 30, 2008 10:53 AM
To: general-toolchain
Subject: Overloading operator new()???

Happy Holidays All -

Our team is considering overloading the new() operator to ensure that a NULL pointer is returned if/when the system is 
out of memory. Currently, even with exceptions disabled, new() throws a std::out_of_memory exception, which is 
undesirable for us...

My question is this: Is there a "best place" to overload operator new() for the entire system?

Thanks!

MikeZ

_______________________________________________
General
http://community.qnx.com/sf/go/post19288