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

Unified Diff: src/heap-inl.h

Issue 14208005: Use worst-fit allocation in old space for prentured objects. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index ab1fdb4cfe6edec5f28ad39da55d44b9c2a73fcc..acbab77294d5a20e5bf53d9e1981c4e15206f0dc 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -145,7 +145,7 @@ MaybeObject* Heap::AllocateOneByteInternalizedString(Vector<const uint8_t> str,
Object* result;
{ MaybeObject* maybe_result = (size > Page::kMaxNonCodeHeapObjectSize)
? lo_space_->AllocateRaw(size, NOT_EXECUTABLE)
- : old_data_space_->AllocateRaw(size);
+ : old_data_space_->AllocateRaw<FreeList::BEST_FIT>(size);
if (!maybe_result->ToObject(&result)) return maybe_result;
}
@@ -179,7 +179,7 @@ MaybeObject* Heap::AllocateTwoByteInternalizedString(Vector<const uc16> str,
Object* result;
{ MaybeObject* maybe_result = (size > Page::kMaxNonCodeHeapObjectSize)
? lo_space_->AllocateRaw(size, NOT_EXECUTABLE)
- : old_data_space_->AllocateRaw(size);
+ : old_data_space_->AllocateRaw<FreeList::BEST_FIT>(size);
if (!maybe_result->ToObject(&result)) return maybe_result;
}
@@ -236,18 +236,18 @@ MaybeObject* Heap::AllocateRaw(int size_in_bytes,
}
if (OLD_POINTER_SPACE == space) {
- result = old_pointer_space_->AllocateRaw(size_in_bytes);
+ result = old_pointer_space_->AllocateRaw<FreeList::BEST_FIT>(size_in_bytes);
} else if (OLD_DATA_SPACE == space) {
- result = old_data_space_->AllocateRaw(size_in_bytes);
+ result = old_data_space_->AllocateRaw<FreeList::BEST_FIT>(size_in_bytes);
} else if (CODE_SPACE == space) {
- result = code_space_->AllocateRaw(size_in_bytes);
+ result = code_space_->AllocateRaw<FreeList::BEST_FIT>(size_in_bytes);
} else if (LO_SPACE == space) {
result = lo_space_->AllocateRaw(size_in_bytes, NOT_EXECUTABLE);
} else if (CELL_SPACE == space) {
- result = cell_space_->AllocateRaw(size_in_bytes);
+ result = cell_space_->AllocateRaw<FreeList::BEST_FIT>(size_in_bytes);
} else {
ASSERT(MAP_SPACE == space);
- result = map_space_->AllocateRaw(size_in_bytes);
+ result = map_space_->AllocateRaw<FreeList::BEST_FIT>(size_in_bytes);
}
if (result->IsFailure()) old_gen_exhausted_ = true;
return result;
@@ -294,7 +294,7 @@ MaybeObject* Heap::AllocateRawMap() {
isolate_->counters()->objs_since_last_full()->Increment();
isolate_->counters()->objs_since_last_young()->Increment();
#endif
- MaybeObject* result = map_space_->AllocateRaw(Map::kSize);
+ MaybeObject* result = map_space_->AllocateRaw<FreeList::BEST_FIT>(Map::kSize);
if (result->IsFailure()) old_gen_exhausted_ = true;
return result;
}
@@ -305,7 +305,8 @@ MaybeObject* Heap::AllocateRawCell() {
isolate_->counters()->objs_since_last_full()->Increment();
isolate_->counters()->objs_since_last_young()->Increment();
#endif
- MaybeObject* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize);
+ MaybeObject* result =
+ cell_space_->AllocateRaw<FreeList::BEST_FIT>(JSGlobalPropertyCell::kSize);
if (result->IsFailure()) old_gen_exhausted_ = true;
return result;
}
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698