Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/tcmalloc/chromium/src/tests/page_heap_test.cc

Issue 7050034: Merge google-perftools r109 (the current contents of third_party/tcmalloc/vendor) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2009 Google Inc. All Rights Reserved. 1 // Copyright 2009 Google Inc. All Rights Reserved.
2 // Author: fikes@google.com (Andrew Fikes) 2 // Author: fikes@google.com (Andrew Fikes)
3 3
4 #include "config_for_unittests.h"
5 #include "page_heap.h"
4 #include <stdio.h> 6 #include <stdio.h>
5 #include "config_for_unittests.h"
6 #include "base/logging.h" 7 #include "base/logging.h"
7 #include "common.h" 8 #include "common.h"
8 #include "page_heap.h"
9 9
10 namespace { 10 namespace {
11 11
12 static void CheckStats(const tcmalloc::PageHeap* ph, 12 static void CheckStats(const tcmalloc::PageHeap* ph,
13 uint64_t system_pages, 13 uint64_t system_pages,
14 uint64_t free_pages, 14 uint64_t free_pages,
15 uint64_t unmapped_pages) { 15 uint64_t unmapped_pages) {
16 tcmalloc::PageHeap::Stats stats = ph->stats(); 16 tcmalloc::PageHeap::Stats stats = ph->stats();
17 EXPECT_EQ(system_pages, stats.system_bytes >> kPageShift); 17 EXPECT_EQ(system_pages, stats.system_bytes >> kPageShift);
18 EXPECT_EQ(free_pages, stats.free_bytes >> kPageShift); 18 EXPECT_EQ(free_pages, stats.free_bytes >> kPageShift);
(...skipping 27 matching lines...) Expand all
46 delete ph; 46 delete ph;
47 } 47 }
48 48
49 } // namespace 49 } // namespace
50 50
51 int main(int argc, char **argv) { 51 int main(int argc, char **argv) {
52 TestPageHeap_Stats(); 52 TestPageHeap_Stats();
53 printf("PASS\n"); 53 printf("PASS\n");
54 return 0; 54 return 0;
55 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698