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

Unified Diff: third_party/tcmalloc/chromium/src/tests/malloc_extension_test.cc

Issue 9667026: Revert 126020 - Experiment for updating the tcmalloc chromium branch to r144 (gperftools 2.0). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/tcmalloc/chromium/src/tests/malloc_extension_test.cc
===================================================================
--- third_party/tcmalloc/chromium/src/tests/malloc_extension_test.cc (revision 126022)
+++ third_party/tcmalloc/chromium/src/tests/malloc_extension_test.cc (working copy)
@@ -36,8 +36,8 @@
#include <stdio.h>
#include <sys/types.h>
#include "base/logging.h"
-#include <gperftools/malloc_extension.h>
-#include <gperftools/malloc_extension_c.h>
+#include <google/malloc_extension.h>
+#include <google/malloc_extension_c.h>
using STL_NAMESPACE::vector;
@@ -55,14 +55,6 @@
ASSERT_TRUE(MallocExtension::instance()->VerifyAllMemory());
ASSERT_TRUE(MallocExtension_VerifyAllMemory());
- ASSERT_EQ(MallocExtension::kOwned,
- MallocExtension::instance()->GetOwnership(a));
- // TODO(csilvers): this relies on undocumented behavior that
- // GetOwnership works on stack-allocated variables. Use a better test.
- ASSERT_EQ(MallocExtension::kNotOwned,
- MallocExtension::instance()->GetOwnership(&cxx_bytes_used));
- ASSERT_EQ(MallocExtension::kNotOwned,
- MallocExtension::instance()->GetOwnership(NULL));
ASSERT_GE(MallocExtension::instance()->GetAllocatedSize(a), 1000);
// This is just a sanity check. If we allocated too much, tcmalloc is broken
ASSERT_LE(MallocExtension::instance()->GetAllocatedSize(a), 5000);
@@ -76,24 +68,12 @@
}
// Check the c-shim version too.
- ASSERT_EQ(MallocExtension_kOwned, MallocExtension_GetOwnership(a));
- ASSERT_EQ(MallocExtension_kNotOwned,
- MallocExtension_GetOwnership(&cxx_bytes_used));
- ASSERT_EQ(MallocExtension_kNotOwned, MallocExtension_GetOwnership(NULL));
ASSERT_GE(MallocExtension_GetAllocatedSize(a), 1000);
ASSERT_LE(MallocExtension_GetAllocatedSize(a), 5000);
ASSERT_GE(MallocExtension_GetEstimatedAllocatedSize(1000), 1000);
free(a);
- // Verify that the .cc file and .h file have the same enum values.
- ASSERT_EQ(static_cast<int>(MallocExtension::kUnknownOwnership),
- static_cast<int>(MallocExtension_kUnknownOwnership));
- ASSERT_EQ(static_cast<int>(MallocExtension::kOwned),
- static_cast<int>(MallocExtension_kOwned));
- ASSERT_EQ(static_cast<int>(MallocExtension::kNotOwned),
- static_cast<int>(MallocExtension_kNotOwned));
-
printf("DONE\n");
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698