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

Unified Diff: src/runtime.cc

Issue 16099004: Added old data space allocation infrastructure for pretenuring. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.h ('k') | src/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 1d0d262fef93bb8f868e07258c4969218480965f..3827ddf24f6845220b07439543935bf413cc6bac 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -9274,6 +9274,27 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_AllocateInOldPointerSpace) {
}
+RUNTIME_FUNCTION(MaybeObject*, Runtime_AllocateInOldDataSpace) {
+ // Allocate a block of memory in old data space (filled with a filler).
+ // Use as fallback for allocation in generated code when old pointer space
+ // is full.
+ ASSERT(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(Smi, size_smi, 0);
+ int size = size_smi->value();
+ RUNTIME_ASSERT(IsAligned(size, kPointerSize));
+ RUNTIME_ASSERT(size > 0);
+ Heap* heap = isolate->heap();
+ Object* allocation;
+ { MaybeObject* maybe_allocation =
+ heap->old_data_space()->AllocateRaw(size);
+ if (maybe_allocation->ToObject(&allocation)) {
+ heap->CreateFillerObjectAt(HeapObject::cast(allocation)->address(), size);
+ }
+ return maybe_allocation;
mvstanton 2013/05/28 07:11:11 Aside from the assert involving MaxNewSpaceAllocat
Hannes Payer (out of office) 2013/05/28 09:06:07 Thanks for the suggestion. I refactored the code.
+ }
+}
+
+
// Push an object unto an array of objects if it is not already in the
// array. Returns true if the element was pushed on the stack and
// false otherwise.
« no previous file with comments | « src/runtime.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698