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

Unified Diff: test/cctest/cctest.h

Issue 1138643005: Clean-up aligned allocation logic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/heap/spaces-inl.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index bade26308f35694e55a935b4f8e2f5d045a5c36f..81bc7b22ee587ab37c93be1ba8d4c9373afca91e 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -504,8 +504,8 @@ static inline void ExpectUndefined(const char* code) {
// Helper function that simulates a full new-space in the heap.
static inline bool FillUpOnePage(v8::internal::NewSpace* space) {
- v8::internal::AllocationResult allocation =
- space->AllocateRaw(v8::internal::Page::kMaxRegularHeapObjectSize);
+ v8::internal::AllocationResult allocation = space->AllocateRawUnaligned(
+ v8::internal::Page::kMaxRegularHeapObjectSize);
if (allocation.IsRetry()) return false;
v8::internal::HeapObject* free_space = NULL;
CHECK(allocation.To(&free_space));
@@ -524,7 +524,7 @@ static inline void AllocateAllButNBytes(v8::internal::NewSpace* space,
int new_linear_size = space_remaining - extra_bytes;
if (new_linear_size == 0) return;
v8::internal::AllocationResult allocation =
- space->AllocateRaw(new_linear_size);
+ space->AllocateRawUnaligned(new_linear_size);
v8::internal::HeapObject* free_space = NULL;
CHECK(allocation.To(&free_space));
space->heap()->CreateFillerObjectAt(free_space->address(), new_linear_size);
« no previous file with comments | « src/heap/spaces-inl.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698