[PATCH] D27003: Return memory to OS right after free (not in the async thread).
Filipe Cabecinhas via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 11:37:59 PST 2016
filcab added inline comments.
================
Comment at: lib/asan/asan_allocator.h:40
u8 alloc_dealloc_mismatch;
+ s32 release_to_os_interval_ms;
----------------
(Unimportant) Nit: Why have a signed number?
================
Comment at: lib/sanitizer_common/sanitizer_common.h:841
+// indicate that sanitizer allocator should not attempt to release memory to OS.
+const s32 kReleaseToOSIntervalNever = -1;
+
----------------
It's not "the magic value" right now, since any negative value will accomplish this.
I don't care that much about the signed/unsigned above, but this comment should (if we keep `s32` as the type) mention the same as the help message: That any negative value means "never".
================
Comment at: lib/sanitizer_common/sanitizer_flags.inc:125
+ "but not more often than this interval (in milliseconds). Negative "
+ "values mean do not attempt to release memory to the OS.\n")
COMMON_FLAG(bool, can_use_proc_maps_statm, true,
----------------
Please mention that this only affects a 64-bit allocator.
https://reviews.llvm.org/D27003
More information about the llvm-commits
mailing list