Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: third_party/WebKit/Source/platform/heap/HeapPage.cpp

Issue 2566973002: debug: turn off sparse bitmap pointer alignment. (Closed)
Patch Set: Restore clearing of unused page payloads in non-debug builds. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/heap/HeapPage.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.cpp b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
index 8dc5d2d0155f2c76ae5d63252c4a9b1b2475f910..99733a57641124d5ff50ad005342f48da5e1fdbd 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
@@ -1502,16 +1502,22 @@ void NormalPage::sweepAndCompact(CompactionContext& context) {
if (markedObjectSize)
pageArena->getThreadState()->increaseMarkedObjectSize(markedObjectSize);
+ Address unusedStart;
+ size_t unusedSize;
+ if (currentPage != this) {
+ unusedStart = payload();
+ unusedSize = payloadSize();
+ } else {
+ unusedStart = payload() + allocationPoint;
+ unusedSize = payloadSize() - allocationPoint;
+ }
#if ENABLE(ASSERT) || defined(LEAK_SANITIZER) || defined(ADDRESS_SANITIZER) || \
defined(MEMORY_SANITIZER)
// Zap the page, which is now available and will either be compacted into
// or freed.
- if (currentPage != this) {
- FreeList::zapFreedMemory(payload(), payloadSize());
- } else {
- FreeList::zapFreedMemory(payload() + allocationPoint,
- payloadSize() - allocationPoint);
- }
+ FreeList::zapFreedMemory(unusedStart, unusedSize);
+#else
+ memset(unusedStart, 0, unusedSize);
#endif
}
« no previous file with comments | « build/config/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698