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

Side by Side Diff: third_party/WebKit/Source/platform/heap/HeapPage.cpp

Issue 2614883006: Change PartitionAlloc to Chromium naming style. (Closed)
Patch Set: Rebase and fix some names. Created 3 years, 11 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
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 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 return header->isFree() && header->size() == payloadSize(); 1335 return header->isFree() && header->size() == payloadSize();
1336 } 1336 }
1337 1337
1338 void NormalPage::removeFromHeap() { 1338 void NormalPage::removeFromHeap() {
1339 arenaForNormalPage()->freePage(this); 1339 arenaForNormalPage()->freePage(this);
1340 } 1340 }
1341 1341
1342 #if !ENABLE(ASSERT) && !defined(LEAK_SANITIZER) && !defined(ADDRESS_SANITIZER) 1342 #if !ENABLE(ASSERT) && !defined(LEAK_SANITIZER) && !defined(ADDRESS_SANITIZER)
1343 static void discardPages(Address begin, Address end) { 1343 static void discardPages(Address begin, Address end) {
1344 uintptr_t beginAddress = 1344 uintptr_t beginAddress =
1345 WTF::roundUpToSystemPage(reinterpret_cast<uintptr_t>(begin)); 1345 WTF::RoundUpToSystemPage(reinterpret_cast<uintptr_t>(begin));
1346 uintptr_t endAddress = 1346 uintptr_t endAddress =
1347 WTF::roundDownToSystemPage(reinterpret_cast<uintptr_t>(end)); 1347 WTF::RoundDownToSystemPage(reinterpret_cast<uintptr_t>(end));
1348 if (beginAddress < endAddress) 1348 if (beginAddress < endAddress)
1349 WTF::discardSystemPages(reinterpret_cast<void*>(beginAddress), 1349 WTF::DiscardSystemPages(reinterpret_cast<void*>(beginAddress),
1350 endAddress - beginAddress); 1350 endAddress - beginAddress);
1351 } 1351 }
1352 #endif 1352 #endif
1353 1353
1354 void NormalPage::sweep() { 1354 void NormalPage::sweep() {
1355 size_t markedObjectSize = 0; 1355 size_t markedObjectSize = 0;
1356 Address startOfGap = payload(); 1356 Address startOfGap = payload();
1357 NormalPageArena* pageArena = arenaForNormalPage(); 1357 NormalPageArena* pageArena = arenaForNormalPage();
1358 for (Address headerAddress = startOfGap; headerAddress < payloadEnd();) { 1358 for (Address headerAddress = startOfGap; headerAddress < payloadEnd();) {
1359 HeapObjectHeader* header = 1359 HeapObjectHeader* header =
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 1911
1912 m_hasEntries = true; 1912 m_hasEntries = true;
1913 size_t index = hash(address); 1913 size_t index = hash(address);
1914 ASSERT(!(index & 1)); 1914 ASSERT(!(index & 1));
1915 Address cachePage = roundToBlinkPageStart(address); 1915 Address cachePage = roundToBlinkPageStart(address);
1916 m_entries[index + 1] = m_entries[index]; 1916 m_entries[index + 1] = m_entries[index];
1917 m_entries[index] = cachePage; 1917 m_entries[index] = cachePage;
1918 } 1918 }
1919 1919
1920 } // namespace blink 1920 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/CallbackStack.cpp ('k') | third_party/WebKit/Source/platform/heap/PageMemory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698