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

Unified Diff: src/runtime.cc

Issue 35313002: MIPS: Ensure double aligned allocations through runtime routines. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 7 years, 1 month 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/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 881020c5af8a54902d1e80e75d24e4cfb39d1b7e..56d1415ce5be15edbf1ff8134f7168766b6c025b 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -9778,6 +9778,7 @@ static MaybeObject* Allocate(Isolate* isolate,
bool double_align,
AllocationSpace space) {
Heap* heap = isolate->heap();
+ if (double_align) size += kPointerSize;
RUNTIME_ASSERT(IsAligned(size, kPointerSize));
RUNTIME_ASSERT(size > 0);
RUNTIME_ASSERT(size <= heap->MaxRegularSpaceAllocationSize());
@@ -9789,6 +9790,9 @@ static MaybeObject* Allocate(Isolate* isolate,
MemoryChunk* chunk = MemoryChunk::FromAddress(allocation->address());
ASSERT(chunk->owner()->identity() == space);
#endif
+ if (double_align) {
+ allocation = heap->EnsureDoubleAligned(allocation, size);
+ }
heap->CreateFillerObjectAt(allocation->address(), size);
return allocation;
}
« 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