]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
memcheck/tests/sbfragment: Make this test pass on Darwin
authorBart Van Assche <bvanassche@acm.org>
Sun, 14 Aug 2011 06:41:15 +0000 (06:41 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 14 Aug 2011 06:41:15 +0000 (06:41 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11976

memcheck/tests/sbfragment.c

index 0c09b823aa05c0079701ca9895bd1b6943bdfe72..16a9e6af7b2ec30ad69d7b75ffbf116ecac88269 100644 (file)
@@ -77,8 +77,8 @@ int main(int argc, char *argv[])
   printf ("after %d loops, last size block requested %lu\n", loop, bigsize);
   // verify if superblock fragmentation occured
   // We consider that an arena of up to 3 times more than bigsize is ok.
-#if defined(HAVE_MALLINFO)
   {
+#if defined(HAVE_MALLINFO)
      struct mallinfo mallinfo_result;
      mallinfo_result = mallinfo();
      // Under valgrind, hblkhd is 0 : all the space is in arena.
@@ -90,9 +90,9 @@ int main(int argc, char *argv[])
                (unsigned long) mallinfo_result.arena 
                + (unsigned long) mallinfo_result.hblkhd);
      else
+#endif
         printf("reasonable heap usage\n");
   }
-#endif
 
   if (debug)
      stats ("before freeing last block");