Commit 99391f02 authored by Chris Palmer's avatar Chris Palmer Committed by Commit Bot

[PartitionAlloc] Don't poison memory on free.

It might? be the cause of a perf regression.

Bug: 882471,680657
Change-Id: Iec34a348426ccfdf5864a3b2cbe0c377da20ac0e
Reviewed-on: https://chromium-review.googlesource.com/1220468
Commit-Queue: Chris Palmer <palmer@chromium.org>
Reviewed-by: default avatarEmil A Eklund <eae@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590508}
parent cdaf041a
......@@ -209,13 +209,9 @@ ALWAYS_INLINE void PartitionPage::Free(void* ptr) {
PartitionCookieCheckValue(ptr);
PartitionCookieCheckValue(reinterpret_cast<char*>(ptr) + slot_size -
kCookieSize);
#endif
// Perhaps surprisingly, this does not measurably regress performance. See
// https://crbug.com/680657 for history. We formerly did this in
// |PartitionFree|, and in `DCHECK_IS_ON()` builds we redundantly did it
// here, too. Now we only do it here, unconditionally.
memset(ptr, kFreedByte, slot_size);
#endif
DCHECK(this->num_allocated_slots);
// TODO(palmer): See if we can afford to make this a CHECK.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment