overloading new/delete

I think the problem here is that your new's parameter profile doesn't match that of the standard operator new, so that one isn't getting hidden (and is thus still being used).

Your parameter profiles for new and delete need to look like this:

void* operator new(size_t);
void operator delete(void*, size_t);

Maybe you can do what you want with a little bit of preprocessor magic:

#include <iostream>

using namespace std;

void* operator new (size_t size, const char* filename, int line) {
    void* ptr = new char[size];
    cout << "size = " << size << " filename = " << filename << " line = " << line << endl;
    return ptr;
}

#define new new(__FILE__, __LINE__)

int main() {
    int* x = new int;
}