diff options
author | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2011-07-24 17:39:10 +0000 |
---|---|---|
committer | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2011-07-24 17:39:10 +0000 |
commit | 45264afb4bc9fe6a80f55a939a06bc067b5f006c (patch) | |
tree | 3eb048b6425060278742d1e137b5a910b45f95f2 /massif | |
parent | dc873c08cc51930ecd35a976c1d03285f9a53b94 (diff) |
Avoid excessive fragmentation in m_mallocfree facility by munmapping
unused superblocks in some circumstances. Bug 250101 (==269884,
==275852)
(Philippe Waroquiers, philippe.waroquiers@skynet.be)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11911 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'massif')
-rw-r--r-- | massif/tests/Makefile.am | 3 | ||||
-rw-r--r-- | massif/tests/big-alloc.post.exp | 24 | ||||
-rw-r--r-- | massif/tests/big-alloc.post.exp-64bit | 54 |
3 files changed, 68 insertions, 13 deletions
diff --git a/massif/tests/Makefile.am b/massif/tests/Makefile.am index ecdd01a4..bfdb842a 100644 --- a/massif/tests/Makefile.am +++ b/massif/tests/Makefile.am @@ -8,7 +8,8 @@ EXTRA_DIST = \ alloc-fns-B.post.exp alloc-fns-B.stderr.exp alloc-fns-B.vgtest \ basic.post.exp basic.stderr.exp basic.vgtest \ basic2.post.exp basic2.stderr.exp basic2.vgtest \ - big-alloc.post.exp big-alloc.stderr.exp big-alloc.vgtest \ + big-alloc.post.exp big-alloc.post.exp-64bit \ + big-alloc.stderr.exp big-alloc.vgtest \ deep-A.post.exp deep-A.stderr.exp deep-A.vgtest \ deep-B.post.exp deep-B.stderr.exp deep-B.vgtest \ deep-C.post.exp deep-C.stderr.exp deep-C.vgtest \ diff --git a/massif/tests/big-alloc.post.exp b/massif/tests/big-alloc.post.exp index 0d8900c8..1cbe6299 100644 --- a/massif/tests/big-alloc.post.exp +++ b/massif/tests/big-alloc.post.exp @@ -36,19 +36,19 @@ Number of snapshots: 11 n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- 0 0 0 0 0 0 - 1 10,485,768 10,485,768 10,485,760 8 0 - 2 20,971,536 20,971,536 20,971,520 16 0 - 3 31,457,304 31,457,304 31,457,280 24 0 - 4 41,943,072 41,943,072 41,943,040 32 0 - 5 52,428,840 52,428,840 52,428,800 40 0 - 6 62,914,608 62,914,608 62,914,560 48 0 - 7 73,400,376 73,400,376 73,400,320 56 0 - 8 83,886,144 83,886,144 83,886,080 64 0 - 9 94,371,912 94,371,912 94,371,840 72 0 -100.00% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. -->100.00% (94,371,840B) 0x........: main (big-alloc.c:12) + 1 10,489,832 10,489,832 10,485,760 4,072 0 + 2 20,979,664 20,979,664 20,971,520 8,144 0 + 3 31,469,496 31,469,496 31,457,280 12,216 0 + 4 41,959,328 41,959,328 41,943,040 16,288 0 + 5 52,449,160 52,449,160 52,428,800 20,360 0 + 6 62,938,992 62,938,992 62,914,560 24,432 0 + 7 73,428,824 73,428,824 73,400,320 28,504 0 + 8 83,918,656 83,918,656 83,886,080 32,576 0 + 9 94,408,488 94,408,488 94,371,840 36,648 0 +99.96% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. +->99.96% (94,371,840B) 0x........: main (big-alloc.c:12) -------------------------------------------------------------------------------- n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) -------------------------------------------------------------------------------- - 10 104,857,680 104,857,680 104,857,600 80 0 + 10 104,898,320 104,898,320 104,857,600 40,720 0 diff --git a/massif/tests/big-alloc.post.exp-64bit b/massif/tests/big-alloc.post.exp-64bit new file mode 100644 index 00000000..8ba7e8ee --- /dev/null +++ b/massif/tests/big-alloc.post.exp-64bit @@ -0,0 +1,54 @@ +-------------------------------------------------------------------------------- +Command: ./big-alloc +Massif arguments: --stacks=no --time-unit=B --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 +-------------------------------------------------------------------------------- + + + MB +100.0^ : + | : + | @@@@@@@: + | @ : + | :::::::@ : + | : @ : + | :::::::: @ : + | : : @ : + | :::::::: : @ : + | : : : @ : + | :::::::: : : @ : + | : : : : @ : + | ::::::::: : : : @ : + | : : : : : @ : + | :::::::: : : : : @ : + | : : : : : : @ : + | :::::::: : : : : : @ : + | : : : : : : : @ : + | :::::::: : : : : : : @ : + | : : : : : : : : @ : + 0 +----------------------------------------------------------------------->MB + 0 100.0 + +Number of snapshots: 11 + Detailed snapshots: [9] + +-------------------------------------------------------------------------------- + n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) +-------------------------------------------------------------------------------- + 0 0 0 0 0 0 + 1 10,489,800 10,489,800 10,485,760 4,040 0 + 2 20,979,600 20,979,600 20,971,520 8,080 0 + 3 31,469,400 31,469,400 31,457,280 12,120 0 + 4 41,959,200 41,959,200 41,943,040 16,160 0 + 5 52,449,000 52,449,000 52,428,800 20,200 0 + 6 62,938,800 62,938,800 62,914,560 24,240 0 + 7 73,428,600 73,428,600 73,400,320 28,280 0 + 8 83,918,400 83,918,400 83,886,080 32,320 0 + 9 94,408,200 94,408,200 94,371,840 36,360 0 +99.96% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. +->99.96% (94,371,840B) 0x........: main (big-alloc.c:12) + +-------------------------------------------------------------------------------- + n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) +-------------------------------------------------------------------------------- + 10 104,898,000 104,898,000 104,857,600 40,400 0 |