| Index: third_party/tcmalloc/chromium/src/heap-checker.cc
|
| ===================================================================
|
| --- third_party/tcmalloc/chromium/src/heap-checker.cc (revision 33071)
|
| +++ third_party/tcmalloc/chromium/src/heap-checker.cc (working copy)
|
| @@ -47,9 +47,11 @@
|
| #ifdef HAVE_PTHREAD
|
| #include <pthread.h>
|
| #endif
|
| +#ifdef HAVE_POLL_H
|
| +#include <poll.h>
|
| +#endif
|
| #include <sys/stat.h>
|
| #include <sys/types.h>
|
| -#include <time.h>
|
| #include <assert.h>
|
|
|
| #ifdef HAVE_LINUX_PTRACE_H
|
| @@ -2296,8 +2298,7 @@
|
| }
|
| if (FLAGS_heap_check_after_destructors) {
|
| if (HeapLeakChecker::DoMainHeapCheck()) {
|
| - const struct timespec sleep_time = { 0, 500000000 }; // 500 ms
|
| - nanosleep(&sleep_time, NULL);
|
| + poll(0, 0, 500);
|
| // Need this hack to wait for other pthreads to exit.
|
| // Otherwise tcmalloc find errors
|
| // on a free() call from pthreads.
|
|
|