diff options
author | Kostya Serebryany <kcc@google.com> | 2012-12-17 07:54:29 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-12-17 07:54:29 +0000 |
commit | c88059cf6e0b47951413107ae8d7a0caabe661fc (patch) | |
tree | 2860a0a0bd479efa9ebdf0dea30c03955280b758 /lib/asan/asan_allocator.h | |
parent | 0a504ec7c360ecfaad8db8607862bc69ed77abfa (diff) |
[asan] implement AsanChunkFifoList via IntrusiveList<AsanChunk>
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170313 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_allocator.h')
-rw-r--r-- | lib/asan/asan_allocator.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/asan/asan_allocator.h b/lib/asan/asan_allocator.h index 98a190428..8754aaa29 100644 --- a/lib/asan/asan_allocator.h +++ b/lib/asan/asan_allocator.h @@ -17,6 +17,7 @@ #include "asan_internal.h" #include "asan_interceptors.h" +#include "sanitizer_common/sanitizer_list.h" // We are in the process of transitioning from the old allocator (version 1) // to a new one (version 2). The change is quite intrusive so both allocators @@ -72,7 +73,8 @@ class AsanChunkView { AsanChunkView FindHeapChunkByAddress(uptr address); -class AsanChunkFifoList { +// List of AsanChunks with total size. +class AsanChunkFifoList: public IntrusiveList<AsanChunk> { public: explicit AsanChunkFifoList(LinkerInitialized) { } AsanChunkFifoList() { clear(); } @@ -81,12 +83,10 @@ class AsanChunkFifoList { AsanChunk *Pop(); uptr size() { return size_; } void clear() { - first_ = last_ = 0; + IntrusiveList<AsanChunk>::clear(); size_ = 0; } private: - AsanChunk *first_; - AsanChunk *last_; uptr size_; }; |