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

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

Issue 7430007: Merge tcmalloc r111 (perftools v. 1.8) with the chromium/ branch. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
===================================================================
--- third_party/tcmalloc/chromium/src/tests/malloc_extension_c_test.c (revision 94429)
+++ third_party/tcmalloc/chromium/src/tests/malloc_extension_c_test.c (working copy)
@@ -126,6 +126,14 @@
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