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 | 41ffe3db59d8198b501ed75e6aaa09c1ff8c58be (patch) | |
tree | 8627610305d908e241bae00ad0de0d142795b7d1 /compiler-rt/lib/asan/asan_allocator.h | |
parent | 3e70c45fa856ddde390d380ea94904e6ef86fcc2 (diff) | |
download | bcm5719-llvm-41ffe3db59d8198b501ed75e6aaa09c1ff8c58be.tar.gz bcm5719-llvm-41ffe3db59d8198b501ed75e6aaa09c1ff8c58be.zip |
[asan] implement AsanChunkFifoList via IntrusiveList<AsanChunk>
llvm-svn: 170313
Diffstat (limited to 'compiler-rt/lib/asan/asan_allocator.h')
-rw-r--r-- | compiler-rt/lib/asan/asan_allocator.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/asan/asan_allocator.h b/compiler-rt/lib/asan/asan_allocator.h index 98a19042830..8754aaa291f 100644 --- a/compiler-rt/lib/asan/asan_allocator.h +++ b/compiler-rt/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_; }; |