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

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 16:13:11 PST 2016


alekseyshl added inline comments.


================
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);
----------------
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.


https://reviews.llvm.org/D27003





More information about the llvm-commits mailing list