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

Unified Diff: third_party/tcmalloc/vendor/src/libc_override_osx.h

Issue 9701040: Revert 126715 - Update the tcmalloc vendor 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/vendor/src/libc_override_osx.h
===================================================================
--- third_party/tcmalloc/vendor/src/libc_override_osx.h (revision 126727)
+++ third_party/tcmalloc/vendor/src/libc_override_osx.h (working copy)
@@ -75,7 +75,7 @@
#ifdef HAVE_FEATURES_H
#include <features.h>
#endif
-#include <gperftools/tcmalloc.h>
+#include <google/tcmalloc.h>
#if !defined(__APPLE__)
# error libc_override_glibc-osx.h is for OS X distributions only.
@@ -84,19 +84,6 @@
#include <AvailabilityMacros.h>
#include <malloc/malloc.h>
-// from AvailabilityMacros.h
-#if defined(MAC_OS_X_VERSION_10_6) && \
- MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
-extern "C" {
- // This function is only available on 10.6 (and later) but the
- // LibSystem headers do not use AvailabilityMacros.h to handle weak
- // importing automatically. This prototype is a copy of the one in
- // <malloc/malloc.h> with the WEAK_IMPORT_ATTRBIUTE added.
- extern malloc_zone_t *malloc_default_purgeable_zone(void)
- WEAK_IMPORT_ATTRIBUTE;
-}
-#endif
-
// We need to provide wrappers around all the libc functions.
namespace {
size_t mz_size(malloc_zone_t* zone, const void* ptr) {
@@ -248,13 +235,8 @@
// doing tiny and small allocs. Sadly, it assumes that the default
// zone is the szone implementation from OS X and will crash if it
// isn't. By creating the zone now, this will be true and changing
- // the default zone won't cause a problem. This only needs to
- // happen when actually running on OS X 10.6 and higher (note the
- // ifdef above only checks if we were *compiled* with 10.6 or
- // higher; at runtime we have to check if this symbol is defined.)
- if (malloc_default_purgeable_zone) {
- malloc_default_purgeable_zone();
- }
+ // the default zone won't cause a problem. (OS X 10.6 and higher.)
+ malloc_default_purgeable_zone();
#endif
// Register the tcmalloc zone. At this point, it will not be the
« no previous file with comments | « third_party/tcmalloc/vendor/src/libc_override_glibc.h ('k') | third_party/tcmalloc/vendor/src/malloc_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698