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

Side by Side Diff: test/cctest/test-spaces.cc

Issue 746443002: Fix Regress3540 after r25441. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 const size_t code_range_size = 4 * MB; 215 const size_t code_range_size = 4 * MB;
216 if (!code_range->SetUp( 216 if (!code_range->SetUp(
217 code_range_size + 217 code_range_size +
218 RoundUp(v8::base::OS::CommitPageSize() * kReservedCodeRangePages, 218 RoundUp(v8::base::OS::CommitPageSize() * kReservedCodeRangePages,
219 MemoryChunk::kAlignment) + 219 MemoryChunk::kAlignment) +
220 v8::internal::MemoryAllocator::CodePageAreaSize())) { 220 v8::internal::MemoryAllocator::CodePageAreaSize())) {
221 return; 221 return;
222 } 222 }
223 Address address; 223 Address address;
224 size_t size; 224 size_t size;
225 address = code_range->AllocateRawMemory(code_range_size - MB, 225 address = code_range->AllocateRawMemory(code_range_size - 2 * MB,
226 code_range_size - MB, &size); 226 code_range_size - 2 * MB, &size);
227 CHECK(address != NULL); 227 CHECK(address != NULL);
228 Address null_address; 228 Address null_address;
229 size_t null_size; 229 size_t null_size;
230 null_address = code_range->AllocateRawMemory( 230 null_address = code_range->AllocateRawMemory(
231 code_range_size - MB, code_range_size - MB, &null_size); 231 code_range_size - MB, code_range_size - MB, &null_size);
232 CHECK(null_address == NULL); 232 CHECK(null_address == NULL);
233 code_range->FreeRawMemory(address, size); 233 code_range->FreeRawMemory(address, size);
234 delete code_range; 234 delete code_range;
235 memory_allocator->TearDown(); 235 memory_allocator->TearDown();
236 delete memory_allocator; 236 delete memory_allocator;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 502
503 // Turn the allocation into a proper object so isolate teardown won't 503 // Turn the allocation into a proper object so isolate teardown won't
504 // crash. 504 // crash.
505 v8::internal::FreeListNode* node = 505 v8::internal::FreeListNode* node =
506 v8::internal::FreeListNode::cast(allocation.ToObjectChecked()); 506 v8::internal::FreeListNode::cast(allocation.ToObjectChecked());
507 node->set_size(new_space->heap(), 80); 507 node->set_size(new_space->heap(), 80);
508 } 508 }
509 } 509 }
510 isolate->Dispose(); 510 isolate->Dispose();
511 } 511 }
OLDNEW
« 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