[PATCH] D71104: scudo: Add a basic malloc/free benchmark.

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 12:15:45 PST 2019


cryptoad added a comment.

Could you please put a comment somewhere on how to use the benchmark?



================
Comment at: compiler-rt/lib/scudo/standalone/benchmarks/malloc_benchmark.cpp:28
+  const size_t NBytes = State.range(0);
+  int PageSize = scudo::getPageSizeCached();
+
----------------
size_t maybe? `getpagesize` returns an `int` but that's awkward I feel, hence `getPageSizeCached` returning an `uptr`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71104





More information about the llvm-commits mailing list