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

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

Issue 1210373002: Oilpan: Decrease m_promptlyFreedSize in makeConsistentForMutator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« 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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 if (markedObjectSize) 1311 if (markedObjectSize)
1312 Heap::increaseMarkedObjectSize(markedObjectSize); 1312 Heap::increaseMarkedObjectSize(markedObjectSize);
1313 } 1313 }
1314 1314
1315 void NormalPage::makeConsistentForMutator() 1315 void NormalPage::makeConsistentForMutator()
1316 { 1316 {
1317 Address startOfGap = payload(); 1317 Address startOfGap = payload();
1318 for (Address headerAddress = payload(); headerAddress < payloadEnd();) { 1318 for (Address headerAddress = payload(); headerAddress < payloadEnd();) {
1319 HeapObjectHeader* header = reinterpret_cast<HeapObjectHeader*>(headerAdd ress); 1319 HeapObjectHeader* header = reinterpret_cast<HeapObjectHeader*>(headerAdd ress);
1320 ASSERT(header->size() < blinkPagePayloadSize()); 1320 ASSERT(header->size() < blinkPagePayloadSize());
1321 // Check if a free list entry first since we cannot call 1321 if (header->isPromptlyFreed())
1322 // isMarked on a free list entry. 1322 heapForNormalPage()->decreasePromptlyFreedSize(header->size());
1323 if (header->isFree()) { 1323 if (header->isFree()) {
1324 headerAddress += header->size(); 1324 headerAddress += header->size();
1325 continue; 1325 continue;
1326 } 1326 }
1327 header->checkHeader(); 1327 header->checkHeader();
1328 1328
1329 if (startOfGap != headerAddress) 1329 if (startOfGap != headerAddress)
1330 heapForNormalPage()->addToFreeList(startOfGap, headerAddress - start OfGap); 1330 heapForNormalPage()->addToFreeList(startOfGap, headerAddress - start OfGap);
1331 if (header->isMarked()) { 1331 if (header->isMarked())
1332 header->unmark(); 1332 header->unmark();
1333 }
1334 headerAddress += header->size(); 1333 headerAddress += header->size();
1335 startOfGap = headerAddress; 1334 startOfGap = headerAddress;
1336 } 1335 }
1337 if (startOfGap != payloadEnd()) 1336 if (startOfGap != payloadEnd())
1338 heapForNormalPage()->addToFreeList(startOfGap, payloadEnd() - startOfGap ); 1337 heapForNormalPage()->addToFreeList(startOfGap, payloadEnd() - startOfGap );
1339 } 1338 }
1340 1339
1341 #if defined(ADDRESS_SANITIZER) 1340 #if defined(ADDRESS_SANITIZER)
1342 void NormalPage::poisonObjects(ObjectsToPoison objectsToPoison, Poisoning poison ing) 1341 void NormalPage::poisonObjects(ObjectsToPoison objectsToPoison, Poisoning poison ing)
1343 { 1342 {
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2444 size_t Heap::s_allocatedObjectSize = 0; 2443 size_t Heap::s_allocatedObjectSize = 0;
2445 size_t Heap::s_allocatedSpace = 0; 2444 size_t Heap::s_allocatedSpace = 0;
2446 size_t Heap::s_markedObjectSize = 0; 2445 size_t Heap::s_markedObjectSize = 0;
2447 // We don't want to use 0 KB for the initial value because it may end up 2446 // We don't want to use 0 KB for the initial value because it may end up
2448 // triggering the first GC of some thread too prematurely. 2447 // triggering the first GC of some thread too prematurely.
2449 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; 2448 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024;
2450 size_t Heap::s_externalObjectSizeAtLastGC = 0; 2449 size_t Heap::s_externalObjectSizeAtLastGC = 0;
2451 double Heap::s_estimatedMarkingTimePerByte = 0.0; 2450 double Heap::s_estimatedMarkingTimePerByte = 0.0;
2452 2451
2453 } // namespace blink 2452 } // 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