00001 /* 00002 * C Implementation: global 00003 * 00004 * Description: Implementation of new- and delete-operators 00005 * 00006 * 00007 * Author: Michel Tokic <michel@tokic.com>, (C) 2009 00008 * 00009 * Copyright: See COPYING file that comes with this distribution 00010 * 00011 */ 00012 #include <stdlib.h> 00013 00014 void * operator new(size_t size) 00015 { 00016 return malloc(size); 00017 } 00018 00019 void operator delete(void * ptr) 00020 { 00021 free(ptr); 00022 } 00023 00024 void * operator new[](size_t size) 00025 { 00026 return malloc(size); 00027 } 00028 00029 void operator delete[](void * ptr) 00030 { 00031 free(ptr); 00032 } 00033