Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

local_new.cpp File Reference

This file contains overrides for the global new and delete operators. More...

#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

void* operator new (size_t num_bytes)
void* operator new[] (size_t num_bytes)
void operator delete (void *addr)
void operator delete[] (void *addr)


Detailed Description

This file contains overrides for the global new and delete operators.

These exist to assure that only the pool allocation functions are called. If you see a message from one of these functions then something other than pool allocation is taking place.

This file is only used for testing. If you don't want to do this check you can remove this file from the software build.

Definition in file local_new.cpp.


Function Documentation

void operator delete ( void * addr )
 

Definition at line 34 of file local_new.cpp.

00035 {
00036   printf("global operator delete\n");
00037   free( addr );
00038 }

void operator delete[] ( void * addr )
 

Definition at line 41 of file local_new.cpp.

00042 {
00043   printf("global operator delete []\n");
00044   free( addr );
00045 }

void * operator new ( size_t num_bytes )
 

Definition at line 18 of file local_new.cpp.

00019 {
00020   printf("global operator new\n");
00021   void *rtn = malloc( num_bytes );
00022   return rtn;
00023 } // new

void * operator new[] ( size_t num_bytes )
 

Definition at line 26 of file local_new.cpp.

00027 {
00028   printf("global operator new []\n");
00029   void *rtn = malloc( num_bytes );
00030   return rtn;
00031 }


Generated at Sat Aug 10 13:23:35 2002 for Wavelet Packet Transform and Lossless Compression by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001