36 using std::set_new_handler ;
45 bool BESMemoryManager::_storage_used(
false);
46 new_handler BESMemoryManager::_global_handler;
65 *(
BESLog::TheLog()) <<
"BESMemoryManager::This is just a simulation, here we tell BES to go to persistence state" << endl;
74 set_new_handler( _global_handler ) ;
86 BESDEBUG(
"bes",
"BES: global pool is used, trying to get it back..." << endl ) ;
90 _storage_used = false ;
96 BESDEBUG(
"bes",
"FAILED" << endl ) ;
111 BESDEBUG(
"bes",
"BES Warning: low in memory, "
112 <<
"releasing global memory pool!" << endl ) ;
114 <<
"releasing global memory pool!"
116 _storage_used = true ;
121 set_new_handler( 0 ) ;