From: Julian Seward Date: Sat, 8 Nov 2008 15:01:22 +0000 (+0000) Subject: Mark allocation operators as no-inline so as to make the test more X-Git-Tag: svn/VALGRIND_3_4_0~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48c4779e665ba1e92fb999dec92def905e4af1e9;p=thirdparty%2Fvalgrind.git Mark allocation operators as no-inline so as to make the test more repeatable across different gccs. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8737 --- diff --git a/massif/tests/overloaded-new.cpp b/massif/tests/overloaded-new.cpp index 63d652f08d..e92cfd55a1 100644 --- a/massif/tests/overloaded-new.cpp +++ b/massif/tests/overloaded-new.cpp @@ -14,32 +14,32 @@ typedef struct { int array[1000]; } s; -void* operator new (std::size_t n) throw (std::bad_alloc) +__attribute__((noinline)) void* operator new (std::size_t n) throw (std::bad_alloc) { return malloc(n); } -void* operator new (std::size_t n, std::nothrow_t const &) throw () +__attribute__((noinline)) void* operator new (std::size_t n, std::nothrow_t const &) throw () { return malloc(n); } -void* operator new[] (std::size_t n) throw (std::bad_alloc) +__attribute__((noinline)) void* operator new[] (std::size_t n) throw (std::bad_alloc) { return malloc(n); } -void* operator new[] (std::size_t n, std::nothrow_t const &) throw () +__attribute__((noinline)) void* operator new[] (std::size_t n, std::nothrow_t const &) throw () { return malloc(n); } -void operator delete (void* p) +__attribute__((noinline)) void operator delete (void* p) { return free(p); } -void operator delete[] (void* p) +__attribute__((noinline)) void operator delete[] (void* p) { return free(p); }