| Index: third_party/tcmalloc/chromium/src/heap-profile-table.cc
|
| diff --git a/third_party/tcmalloc/chromium/src/heap-profile-table.cc b/third_party/tcmalloc/chromium/src/heap-profile-table.cc
|
| index 1d799240cd2912208a3668fa3972df8a32993678..9d60b690ffde501dbdbdedaf8f603dc623c044cc 100644
|
| --- a/third_party/tcmalloc/chromium/src/heap-profile-table.cc
|
| +++ b/third_party/tcmalloc/chromium/src/heap-profile-table.cc
|
| @@ -526,7 +526,10 @@ bool HeapProfileTable::WriteProfile(const char* file_name,
|
| void HeapProfileTable::CleanupOldProfiles(const char* prefix) {
|
| if (!FLAGS_cleanup_old_heap_profiles)
|
| return;
|
| - string pattern = string(prefix) + ".*" + kFileExt;
|
| + char buf[1000];
|
| + snprintf(buf, 1000,"%s.%05d.", prefix, getpid());
|
| + string pattern = string(buf) + ".*" + kFileExt;
|
| +
|
| #if defined(HAVE_GLOB_H)
|
| glob_t g;
|
| const int r = glob(pattern.c_str(), GLOB_ERR, NULL, &g);
|
|
|