[Allocator] Remove memory poisoning before deallocation
authorReid Kleckner <reid@kleckner.net>
Wed, 22 Apr 2015 20:56:42 +0000 (20:56 +0000)
committerReid Kleckner <reid@kleckner.net>
Wed, 22 Apr 2015 20:56:42 +0000 (20:56 +0000)
commit60dea16af4c4799bade66d7a71d573a4a3a9e40c
treea30e9c864e38933f65bf56724608ef8e8478c728
parente7c28bc19c4e5e8b6add1cc9ece537f05777bb3c
[Allocator] Remove memory poisoning before deallocation

I added the poisoning back in r76891 (2009) because of some bugs in
Unladen Swallow, and then Evan Cheng added the setRangeWritable() call
in r81308. Profiling a Release+Asserts build on Windows shows that this
memory protection call is actually very expensive. 4 seconds of a 70
second Clang compilation are spent in VirtualQuery. These days we have
more reliable tools like ASan to find these kinds of bugs, so we can go
ahead and retire these checks.

llvm-svn: 235542
llvm/include/llvm/Support/Allocator.h