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

Unified Diff: third_party/tcmalloc/chromium/src/base/sysinfo.cc

Issue 9323026: [NOT TO COMMIT!] r109: Diff of the current tcmalloc from the original google-perftools r109. (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/base/sysinfo.cc
diff --git a/third_party/tcmalloc/chromium/src/base/sysinfo.cc b/third_party/tcmalloc/chromium/src/base/sysinfo.cc
index 5396743d70e717041aeb86b587d0136c48893c38..285630e3a9d0e85457d470dff5d74d1bd552949d 100644
--- a/third_party/tcmalloc/chromium/src/base/sysinfo.cc
+++ b/third_party/tcmalloc/chromium/src/base/sysinfo.cc
@@ -179,6 +179,9 @@ const char* GetenvBeforeMain(const char* name) {
// in their first character! If that assumption is violated, we'll
// still get a profile, but one with an unexpected name.
// TODO(csilvers): set an envvar instead when we can do it reliably.
+//
+// In Chromium this hack is intentionally disabled, because the path is not
+// re-initialized upon fork.
bool GetUniquePathFromEnv(const char* env_name, char* path) {
char* envval = getenv(env_name);
if (envval == NULL || *envval == '\0')
@@ -188,7 +191,9 @@ bool GetUniquePathFromEnv(const char* env_name, char* path) {
envval[0] & 127, envval+1, (unsigned int)(getpid()));
} else {
snprintf(path, PATH_MAX, "%s", envval);
+#if 0
envval[0] |= 128; // set high bit for kids to see
+#endif
}
return true;
}
« no previous file with comments | « third_party/tcmalloc/chromium/src/base/stl_allocator.h ('k') | third_party/tcmalloc/chromium/src/base/vdso_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698