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

Unified Diff: src/heap/spaces.cc

Issue 1840083002: FreeList::FindNodeFor should not account for node size twice. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index 1e0ed9c8fd10dbefc3e1646de6fd1c979ada6b38..cc8a9beb49eb5a47ef28a06fd6bfa188d96b2bc5 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -2327,7 +2327,6 @@ FreeSpace* FreeList::SearchForNodeInList(FreeListCategoryType type,
FreeSpace* FreeList::FindNodeFor(int size_in_bytes, int* node_size) {
FreeSpace* node = nullptr;
- Page* page = nullptr;
// First try the allocation fast path: try to allocate the minimum element
// size of a free list category. This operation is constant time.
@@ -2354,11 +2353,6 @@ FreeSpace* FreeList::FindNodeFor(int size_in_bytes, int* node_size) {
// requested size.
type = SelectFreeListCategoryType(size_in_bytes);
node = TryFindNodeIn(type, node_size, size_in_bytes);
- if (node != nullptr) {
- DCHECK(size_in_bytes <= *node_size);
- page = Page::FromAddress(node->address());
- page->add_available_in_free_list(-(*node_size));
- }
DCHECK(IsVeryLong() || Available() == SumFreeLists());
return node;
« 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