[PATCH] D84361: scudo: Interleave odd and even tags for adjacent blocks.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 12:07:40 PDT 2020


pcc marked 2 inline comments as done.
pcc added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/tests/combined_test.cpp:496
+TEST(ScudoCombinedTest, OddEven) {
+  using AllocatorT = scudo::Allocator<scudo::AndroidConfig>;
+  using SizeClassMap = AllocatorT::PrimaryT::SizeClassMap;
----------------
vitalybuka wrote:
> in a separate patch, could you fix this?
> somewhere in the begining
> 
> ```
> template  <class Base>
> class TestAllocator : public Base {
>   TestAllocator() {
>     reset();
>     // maybe releaseToOS();
>   }
>   ~TestAllocator() {
>       unmapTestOnly();
>   }
> };
> ```
> 
> 
> and then replace everywhere with
> 
> ````
>   TestAllocator<scudo::Allocator<scudo::AndroidConfig>> Allocator;
>   ....
>   useAllocator(Allocator);
> 
> 
> ```
Seems mostly reasonable to me, see D84454. The allocator objects are too large to go on the stack, so I kept them on the heap.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84361/new/

https://reviews.llvm.org/D84361





More information about the llvm-commits mailing list