OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/process_util.h" | 5 #include "base/process_util.h" |
6 | 6 |
7 #include <dirent.h> | 7 #include <dirent.h> |
8 #include <malloc.h> | 8 #include <malloc.h> |
9 #include <sys/time.h> | 9 #include <sys/time.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 } | 679 } |
680 | 680 |
681 void OnNoMemory() { | 681 void OnNoMemory() { |
682 OnNoMemorySize(0); | 682 OnNoMemorySize(0); |
683 } | 683 } |
684 | 684 |
685 } // namespace | 685 } // namespace |
686 | 686 |
687 extern "C" { | 687 extern "C" { |
688 #if !defined(USE_TCMALLOC) && !defined(ADDRESS_SANITIZER) && \ | 688 #if !defined(USE_TCMALLOC) && !defined(ADDRESS_SANITIZER) && \ |
689 !defined(OS_ANDROID) | 689 !defined(OS_ANDROID) && !defined(THREAD_SANITIZER) |
690 | 690 |
691 extern "C" { | 691 extern "C" { |
692 void* __libc_malloc(size_t size); | 692 void* __libc_malloc(size_t size); |
693 void* __libc_realloc(void* ptr, size_t size); | 693 void* __libc_realloc(void* ptr, size_t size); |
694 void* __libc_calloc(size_t nmemb, size_t size); | 694 void* __libc_calloc(size_t nmemb, size_t size); |
695 void* __libc_valloc(size_t size); | 695 void* __libc_valloc(size_t size); |
696 void* __libc_pvalloc(size_t size); | 696 void* __libc_pvalloc(size_t size); |
697 void* __libc_memalign(size_t alignment, size_t size); | 697 void* __libc_memalign(size_t alignment, size_t size); |
698 } // extern "C" | 698 } // extern "C" |
699 | 699 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 int score_len = static_cast<int>(score_str.length()); | 819 int score_len = static_cast<int>(score_str.length()); |
820 return (score_len == file_util::WriteFile(oom_file, | 820 return (score_len == file_util::WriteFile(oom_file, |
821 score_str.c_str(), | 821 score_str.c_str(), |
822 score_len)); | 822 score_len)); |
823 } | 823 } |
824 | 824 |
825 return false; | 825 return false; |
826 } | 826 } |
827 | 827 |
828 } // namespace base | 828 } // namespace base |
OLD | NEW |