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

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 18:29:14 PDT 2019


morehouse accepted this revision.
morehouse added inline comments.
This revision is now accepted and ready to land.


================
Comment at: compiler-rt/lib/scudo/standalone/secondary.h:222
+        FreeBlocks.push_back(H);
+      const uptr From =
+          roundUpTo(reinterpret_cast<uptr>(H) + LargeBlock::getHeaderSize(),
----------------
Nit:  `From` is a bit ambiguous.  Maybe `AllocationStart` is more precise?


================
Comment at: compiler-rt/lib/scudo/standalone/secondary.h:228
+      releasePagesToOS(H->MapBase, From - H->MapBase, H->BlockEnd - From,
+                       &Data);
+      return;
----------------
This does not release the header page, but we still reduce `StatAllocated` by `CommitSize`, which includes the the header page.  Is this intended?


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