[PATCH] D74567: [scudo][standalone] Workaround for full regions on Android

Mitch Phillips via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 10:33:43 PST 2020


hctim accepted this revision.
hctim marked an inline comment as done.
hctim added a comment.

LGTM w/ one suggestion



================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:275
+      // not fail.
+      if (SCUDO_ANDROID && SCUDO_CAN_USE_PRIMARY64) {
+        if (UNLIKELY(!Block)) {
----------------
cryptoad wrote:
> hctim wrote:
> > Why not do this for all platforms?
> We had to reduce the region sizes on Android to 256MB, other platforms usually have 1GB or more, which makes them less likely to run out of space in the primary.
> Since it only surfaced on Android, I figured I would spare the other platforms the additional code.
i'm not sure you're saving either runtime or code size here - i'd say just make the branch

`if (UNLIKELY(!Block) && SCUDO_CAN_USE_PRIMARY64) {`

Up to you though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74567





More information about the llvm-commits mailing list