[PATCH] D69570: [scudo][standalone] Add a free list to the Secondary

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 09:23:59 PDT 2019


cryptoad added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/secondary.h:228
+      releasePagesToOS(H->MapBase, From - H->MapBase, H->BlockEnd - From,
+                       &Data);
+      return;
----------------
morehouse wrote:
> This does not release the header page, but we still reduce `StatAllocated` by `CommitSize`, which includes the the header page.  Is this intended?
This is intended. I chose the value that would always be consistent between allocations & deallocations so that there is no discrepancy later one.
I initially used sizes that were closer to the actual user size but ended up with `FreedBytes` > `AllocatedBytes` and messed up stats.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69570





More information about the llvm-commits mailing list