1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <stdexcept> #include <stdio.h> #include <string> #include "test_support.h" bool gUsedFooNew = false; // get a strong definition of this C++ symbol __attribute__((used)) void* operator new(size_t size) { gUsedFooNew = true; return malloc(size); }