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

Unified Diff: third_party/tcmalloc/chromium/src/tests/malloc_extension_c_test.c

Issue 9320005: [NOT TO COMMIT!] Replace third_party/tcmalloc/chromium with tcmalloc r136 (the latest). (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 11 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_c_test.c
diff --git a/third_party/tcmalloc/chromium/src/tests/malloc_extension_c_test.c b/third_party/tcmalloc/chromium/src/tests/malloc_extension_c_test.c
index e384b764b53d1684213b8891e5eba01ad39d617c..57cdbbd2239e353bbdcb5fd59b6bededa0d53a0f 100644
--- a/third_party/tcmalloc/chromium/src/tests/malloc_extension_c_test.c
+++ b/third_party/tcmalloc/chromium/src/tests/malloc_extension_c_test.c
@@ -126,6 +126,14 @@ void TestMallocExtension(void) {
if (MallocExtension_GetAllocatedSize(x) < 10) {
FAIL("GetEstimatedAllocatedSize returned a bad value (too small)");
}
+ if (MallocExtension_GetOwnership(x) != MallocExtension_kOwned) {
+ FAIL("DidAllocatePtr returned a bad value (kNotOwned)");
+ }
+ /* TODO(csilvers): this relies on undocumented behavior that
+ GetOwnership works on stack-allocated variables. Use a better test. */
+ if (MallocExtension_GetOwnership(hist) != MallocExtension_kNotOwned) {
+ FAIL("DidAllocatePtr returned a bad value (kOwned)");
+ }
free(x);
}

Powered by Google App Engine
This is Rietveld 408576698