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

Side by Side Diff: Source/platform/heap/Heap.cpp

Issue 1117273002: Oilpan: unpoison large object payload before finalizing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 1154
1155 largeObject->link(&m_firstPage); 1155 largeObject->link(&m_firstPage);
1156 1156
1157 Heap::increaseAllocatedSpace(largeObject->size()); 1157 Heap::increaseAllocatedSpace(largeObject->size());
1158 Heap::increaseAllocatedObjectSize(largeObject->size()); 1158 Heap::increaseAllocatedObjectSize(largeObject->size());
1159 return result; 1159 return result;
1160 } 1160 }
1161 1161
1162 void LargeObjectHeap::freeLargeObjectPage(LargeObjectPage* object) 1162 void LargeObjectHeap::freeLargeObjectPage(LargeObjectPage* object)
1163 { 1163 {
1164 ASAN_UNPOISON_MEMORY_REGION(object->payload(), object->payloadSize());
1164 object->heapObjectHeader()->finalize(object->payload(), object->payloadSize( )); 1165 object->heapObjectHeader()->finalize(object->payload(), object->payloadSize( ));
1165 Heap::decreaseAllocatedSpace(object->size()); 1166 Heap::decreaseAllocatedSpace(object->size());
1166 1167
1167 // Unpoison the object header and allocationGranularity bytes after the 1168 // Unpoison the object header and allocationGranularity bytes after the
1168 // object before freeing. 1169 // object before freeing.
1169 ASAN_UNPOISON_MEMORY_REGION(object->heapObjectHeader(), sizeof(HeapObjectHea der)); 1170 ASAN_UNPOISON_MEMORY_REGION(object->heapObjectHeader(), sizeof(HeapObjectHea der));
1170 ASAN_UNPOISON_MEMORY_REGION(object->address() + object->size(), allocationGr anularity); 1171 ASAN_UNPOISON_MEMORY_REGION(object->address() + object->size(), allocationGr anularity);
1171 1172
1172 if (object->terminating()) { 1173 if (object->terminating()) {
1173 ASSERT(ThreadState::current()->isTerminating()); 1174 ASSERT(ThreadState::current()->isTerminating());
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 size_t Heap::s_allocatedObjectSize = 0; 2731 size_t Heap::s_allocatedObjectSize = 0;
2731 size_t Heap::s_allocatedSpace = 0; 2732 size_t Heap::s_allocatedSpace = 0;
2732 size_t Heap::s_markedObjectSize = 0; 2733 size_t Heap::s_markedObjectSize = 0;
2733 // We don't want to use 0 KB for the initial value because it may end up 2734 // We don't want to use 0 KB for the initial value because it may end up
2734 // triggering the first GC of some thread too prematurely. 2735 // triggering the first GC of some thread too prematurely.
2735 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; 2736 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024;
2736 size_t Heap::s_externalObjectSizeAtLastGC = 0; 2737 size_t Heap::s_externalObjectSizeAtLastGC = 0;
2737 double Heap::s_estimatedMarkingTimePerByte = 0.0; 2738 double Heap::s_estimatedMarkingTimePerByte = 0.0;
2738 2739
2739 } // namespace blink 2740 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698