]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Mark allocation operators as no-inline so as to make the test more
authorJulian Seward <jseward@acm.org>
Sat, 8 Nov 2008 15:01:22 +0000 (15:01 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 8 Nov 2008 15:01:22 +0000 (15:01 +0000)
repeatable across different gccs.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8737

massif/tests/overloaded-new.cpp

index 63d652f08d925457da84e201059a63f8ea123e4b..e92cfd55a1cf9c29d6cd39789b1858b2c6ccff13 100644 (file)
@@ -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);
 }