diff options
author | Sergey Matveev <earthdok@google.com> | 2014-12-19 14:45:19 +0000 |
---|---|---|
committer | Sergey Matveev <earthdok@google.com> | 2014-12-19 14:45:19 +0000 |
commit | bb1b131e73c32024da3da0533959037b4c8645d3 (patch) | |
tree | 0066ac0b5339206c1123dfb28b0b93f12f0ffddb /lib/sanitizer_common/sanitizer_allocator.h | |
parent | b8a10ec2d253e6303713e4fd07b49b94f6d255bd (diff) | |
download | compiler-rt-bb1b131e73c32024da3da0533959037b4c8645d3.tar.gz |
[sanitizer] Rename InitIfLinkerInitialized to InitLinkerInitialized.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_allocator.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_allocator.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/sanitizer_common/sanitizer_allocator.h b/lib/sanitizer_common/sanitizer_allocator.h index 71930ba6b..d3723eb1d 100644 --- a/lib/sanitizer_common/sanitizer_allocator.h +++ b/lib/sanitizer_common/sanitizer_allocator.h @@ -211,7 +211,7 @@ class AllocatorStats { void Init() { internal_memset(this, 0, sizeof(*this)); } - void InitIfLinkerInitialized() {} + void InitLinkerInitialized() {} void Add(AllocatorStat i, uptr v) { v += atomic_load(&stats_[i], memory_order_relaxed); @@ -241,13 +241,13 @@ class AllocatorStats { // Global stats, used for aggregation and querying. class AllocatorGlobalStats : public AllocatorStats { public: - void InitIfLinkerInitialized() { + void InitLinkerInitialized() { next_ = this; prev_ = this; } void Init() { internal_memset(this, 0, sizeof(*this)); - InitIfLinkerInitialized(); + InitLinkerInitialized(); } void Register(AllocatorStats *s) { @@ -1006,14 +1006,14 @@ struct SizeClassAllocatorLocalCache { template <class MapUnmapCallback = NoOpMapUnmapCallback> class LargeMmapAllocator { public: - void InitIfLinkerInitialized(bool may_return_null) { + void InitLinkerInitialized(bool may_return_null) { page_size_ = GetPageSizeCached(); atomic_store(&may_return_null_, may_return_null, memory_order_relaxed); } void Init(bool may_return_null) { internal_memset(this, 0, sizeof(*this)); - InitIfLinkerInitialized(may_return_null); + InitLinkerInitialized(may_return_null); } void *Allocate(AllocatorStats *stat, uptr size, uptr alignment) { @@ -1266,9 +1266,9 @@ class CombinedAllocator { atomic_store(&may_return_null_, may_return_null, memory_order_relaxed); } - void InitIfLinkerInitialized(bool may_return_null) { - secondary_.InitIfLinkerInitialized(may_return_null); - stats_.InitIfLinkerInitialized(); + void InitLinkerInitialized(bool may_return_null) { + secondary_.InitLinkerInitialized(may_return_null); + stats_.InitLinkerInitialized(); InitCommon(may_return_null); } |