00001 /********************************************************** 00002 * Copyright (c) 2000 Glen Kramer. All rights reserved 00003 * 00004 * Filename: _types.h 00005 * 00006 * Description: This file contains type definitions and 00007 * general macros 00008 * 00009 *********************************************************/ 00010 00011 #if !defined _UTIL_H_V001_INCLUDED_ 00012 #define _UTIL_H_V001_INCLUDED_ 00013 00014 #include <stdlib.h> 00015 #include <new> 00016 00017 /******************************************************** 00018 ** METHOD: insufficient_memory_handle( size_t ) 00019 ** PURPOSE: Terminates application if operator new fails 00020 ** ARGUMENTS: 00021 ** RETURN VALUE: 00022 ********************************************************/ 00023 int insufficient_memory_handle( size_t sz ) 00024 { 00025 perror("Memory allocation failed. Terminating application..."); 00026 exit( 100 ); 00027 } 00028 00029 #endif // _UTIL_H_V001_INCLUDED_