home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / new.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-16  |  2.0 KB  |  50 lines

  1. #ifndef __new_h
  2.    #define __new_h
  3.  
  4.    /********************************************************************/
  5.    /*  <new.h> header file                                             */
  6.    /*                                                                  */
  7.    /*  VisualAge for C++ for Windows, Version 3.5                      */
  8.    /*    Licensed Material - Property of IBM                           */
  9.    /*                                                                  */
  10.    /*  5801-ARR and Other Materials                                    */
  11.    /*                                                                  */
  12.    /*  (c) Copyright IBM Corp 1991, 1996. All rights reserved.         */
  13.    /*                                                                  */
  14.    /********************************************************************/
  15.    #include <stddef.h>
  16.  
  17.    // Definition of C++ storage management -- new & delete
  18.  
  19.    void (*set_new_handler (void(*)()))();
  20.    #ifdef __MULTI__
  21.       void (*_set_mt_new_handler (void(*)()))();
  22.    #endif
  23.  
  24.    // The standard favourites
  25.  
  26.    #ifndef __DEBUG_ALLOC__
  27.       void *operator new(size_t size);
  28.       void *operator new(size_t size, void *location);
  29.  
  30.       void *operator new[](size_t size);
  31.       void *operator new[](size_t size, void *location);
  32.  
  33.       void operator delete(void *location);
  34.  
  35.       void operator delete[](void *location);
  36.    #else
  37.       #include <stdlib.h>
  38.  
  39.       void *operator new(size_t size, const char *filename, size_t lineno);
  40.       void *operator new(size_t size, const char *filename, size_t lineno, void *location);
  41.  
  42.       void *operator new[](size_t size, const char *filename, size_t lineno);
  43.       void *operator new[](size_t size, const char *filename, size_t lineno, void *location);
  44.  
  45.       void operator delete(void *location, const char *filename, size_t lineno);
  46.  
  47.       void operator delete[](void *location, const char *filename, size_t lineno);
  48.    #endif
  49. #endif
  50.