00001
00002 #include <stdio.h>
00003 #include <stdlib.h>
00004
00017
00018 void *operator new( size_t num_bytes )
00019 {
00020 printf("global operator new\n");
00021 void *rtn = malloc( num_bytes );
00022 return rtn;
00023 }
00024
00025
00026 void *operator new[]( size_t num_bytes )
00027 {
00028 printf("global operator new []\n");
00029 void *rtn = malloc( num_bytes );
00030 return rtn;
00031 }
00032
00033
00034 void operator delete( void *addr )
00035 {
00036 printf("global operator delete\n");
00037 free( addr );
00038 }
00039
00040
00041 void operator delete[](void *addr )
00042 {
00043 printf("global operator delete []\n");
00044 free( addr );
00045 }