[PATCH] D27003: Return memory to OS right after free (not in the async thread).

Evgeniy Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 16:17:53 PST 2016


eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/sanitizer_common/sanitizer_allocator_primary64.h:466
+    const uptr page_size = GetPageSizeCached();
+    CHECK_GE(end_ptr - beg_ptr, page_size);
+    beg_ptr = RoundUpTo(beg_ptr, page_size);
----------------
alekseyshl wrote:
> eugenis wrote:
> > I don't think this can be a CHECK any longer. The caller does not guarantee page size granularity.
> Why so? It is called from the loop in which we collect chunks until we get more than a page size.
sorry, I've misread the code


https://reviews.llvm.org/D27003





More information about the llvm-commits mailing list