[PATCH] [sanitizer] Implement TwoLevelByteMap and use it for the internal allocator on 64-bit.

Kostya Serebryany kcc at google.com
Mon Nov 25 03:39:28 PST 2013



================
Comment at: lib/sanitizer_common/tests/sanitizer_allocator_test.cc:826
@@ +825,3 @@
+  TestByteMapParam *p = (TestByteMapParam*)param;
+  fprintf(stderr, "Thread %zd %zd\n", p->shard, p->m->size());
+  for (size_t i = p->shard; i < p->m->size(); i += p->num_shards) {
----------------
Dmitry Vyukov wrote:
> please remove debugging output
done

================
Comment at: lib/sanitizer_common/sanitizer_allocator.h:615
@@ +614,3 @@
+
+  void set(uptr idx, u8 val) {
+    CHECK_LT(idx, kSize1 * kSize2);
----------------
Dmitry Vyukov wrote:
> s/set/Set/
I kept 'set' because this is already the existing interface. (from FlatByteMap)


http://llvm-reviews.chandlerc.com/D2259

COMMIT
  http://llvm-reviews.chandlerc.com/rL195637



More information about the llvm-commits mailing list