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

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 14:23:09 PDT 2017


cryptoad added a comment.

I do not have comments on the code, it looks good to me.

There is a few points I was thinking about, not in the sense of suggestions for this CL, but rather general wondering:

- How about about bumping last_release_at_ns when a region is grown? This would prevent the reclaiming to occur shortly after, and could lower the chances of releasing pages that were just allocated.
- Could there be enough room in the free array to not have to map memory? eg: the memory between num_freed_chunks*sizeof(CompactPtrT) and mapped_free_array could be enough. I am not sure it would necessarily be a gain except maybe in memory usage. But since the memory is unmapped right after it might be worthless.
- Did the tests show in any way what could be a good balance timing/cpu wise to set a default to?


https://reviews.llvm.org/D38245





More information about the llvm-commits mailing list