[PATCH] D133713: [Support] Introduce ThreadSafeAllocator

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 12:34:57 PDT 2022


dblaikie added a comment.

testing might be more robust if a mock allocator were used underneath this allocator? that mock allocator could block/wait to intentionally induce contention and demonstrate that the threads do block/wait appropriately?



================
Comment at: llvm/include/llvm/Support/ThreadSafeAllocator.h:25
+/// BumpPtrAllocator implementation that only use a fair lock when allocating a
+/// new stab but otherwise using atomic and be lock-free.
+template <class AllocatorType> class ThreadSafeAllocator {
----------------
?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133713



More information about the llvm-commits mailing list