From: Nicholas Nethercote Date: Thu, 21 May 2009 03:36:21 +0000 (+0000) Subject: DARWIN sync: make VG_MIN_MALLOC_SZB 16 bytes where appropriate. Add another X-Git-Tag: svn/VALGRIND_3_5_0~631 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=790fbdfa1abf81fd467e1d046601d43ffd388367;p=thirdparty%2Fvalgrind.git DARWIN sync: make VG_MIN_MALLOC_SZB 16 bytes where appropriate. Add another output for massif/tests/one to account for it. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10066 --- diff --git a/coregrind/pub_core_mallocfree.h b/coregrind/pub_core_mallocfree.h index f63a7e6061..5bf2088a70 100644 --- a/coregrind/pub_core_mallocfree.h +++ b/coregrind/pub_core_mallocfree.h @@ -69,7 +69,18 @@ typedef Int ArenaId; // This is both the minimum payload size of a malloc'd block, and its // minimum alignment. Must be a power of 2 greater than 4, and should be // greater than 8. -#define VG_MIN_MALLOC_SZB 8 +#if defined(VGP_x86_linux) || \ + defined(VGP_ppc32_linux) || \ + defined(VGP_ppc32_aix5) +# define VG_MIN_MALLOC_SZB 8 +#elif defined(VGP_amd64_linux) || \ + defined(VGP_ppc64_linux) || \ + defined(VGP_ppc64_aix5) +# define VG_MIN_MALLOC_SZB 16 +#else +# error Unknown platform +#endif + /* This struct definition MUST match the system one. */ /* SVID2/XPG mallinfo structure */ diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am index b966a6c3a1..c85bbfbe28 100644 --- a/massif/tests/Makefile.am +++ b/massif/tests/Makefile.am @@ -25,7 +25,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ new-cpp.post.exp new-cpp.stderr.exp new-cpp.vgtest \ no-stack-no-heap.post.exp no-stack-no-heap.stderr.exp no-stack-no-heap.vgtest \ null.post.exp null.stderr.exp null.vgtest \ - one.post.exp one.stderr.exp one.vgtest \ + one.post.exp one.post.exp2 one.stderr.exp one.vgtest \ overloaded-new.post.exp overloaded-new.stderr.exp overloaded-new.vgtest \ peak.post.exp peak.stderr.exp peak.vgtest \ peak2.post.exp peak2.stderr.exp peak2.vgtest \ diff --git a/massif/tests/one.post.exp2 b/massif/tests/one.post.exp2 new file mode 100644 index 0000000000..2162de6b42 --- /dev/null +++ b/massif/tests/one.post.exp2 @@ -0,0 +1,39 @@ +-------------------------------------------------------------------------------- +Command: ./one +Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element +ms_print arguments: massif.out +-------------------------------------------------------------------------------- + + + B + 16^ : + | : + | : + | : + | : + | : + | : + | : + | : + | : + | : + | : + | : + | : + | : + | : + | : + | : + | : + | : + 0 +----------------------------------------------------------------------->B + 0 16 + +Number of snapshots: 2 + Detailed snapshots: [] + +-------------------------------------------------------------------------------- + n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) +-------------------------------------------------------------------------------- + 0 0 0 0 0 0 + 1 16 16 1 15 0