1

Why new & delete operator symbols in shared-obj is to be relocated even if they are implemented in that shared-obj?

view story
linux-howto

http://unix.stackexchange.com – I am trying to implement my own C++ new & delete operators in my program as below: #include <stdio.h> #include <stdlib.h> #include <new> using namespace std; void *operator new(std::size_t size) throw(std::bad_alloc) { printf("My new is called!\n"); return malloc(size); } void operator delete(void *ptr) throw () { printf("My delete is called!\n"); free(ptr); } void *operator new(std::size_t size, const std::nothrow_t&) throw() { return malloc(size); } void operator delete(void *ptr, const std::nothrow_t&) throw() { free(ptr); } void (HowTos)