[PATCH] D111256: [NFC][sanitizer] Remove global PersistentAllocator

Matt Morehouse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 6 14:32:29 PDT 2021


morehouse added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_persistent_allocator.h:61
     uptr mem = (uptr)MmapOrDie(allocsz, "stack depot");
+    atomic_fetch_add(&allocated_size, allocsz, memory_order_relaxed);
     atomic_store(&region_end, mem + allocsz, memory_order_release);
----------------
This changes the meaning of `stats.allocated` to "mmapped memory" instead of "returned memory"


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_persistent_allocator.h:64
     atomic_store(&region_pos, mem, memory_order_release);
+    atomic_store(&region_pos, mem, memory_order_release);
   }
----------------
duplicate line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111256



More information about the cfe-commits mailing list