[PATCH] D38245: [Sanitizers] Allocator: new "release memory to OS" implementation

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 15:31:22 PDT 2017


alekseyshl added a comment.

In https://reviews.llvm.org/D38245#880753, @eugenis wrote:

> Why are you mapping the counters in a specific place just after the free array, instead of simply anywhere? I.e. why MAP_FIXED at all?


The original idea was to keep it mapped between iterations, but yes, it does not make much sense anymore and we can always get back to it later. Switched to just mapping.



================
Comment at: lib/sanitizer_common/sanitizer_allocator_primary64.h:772
+    ThisT* const allocator;
+    RegionInfo* const region;
+    const uptr region_base;
----------------
eugenis wrote:
> These are const pointers to mutable objects. What's the point?
> 
The point is to indicate that this pointer do not change, but you just reminded me that actually I was going to make CompactPtrToPointer et al const and switch to const refs. Done.


https://reviews.llvm.org/D38245





More information about the llvm-commits mailing list