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

Side by Side Diff: src/heap/spaces.cc

Issue 2418733002: [heap] Fix MemoryAllocator::AllocateAlignedMemory. (Closed)
Patch Set: Deleted not needed Decrement. Created 4 years, 2 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 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/spaces.h" 5 #include "src/heap/spaces.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 UpdateAllocatedSpaceLimits(base, base + commit_size); 471 UpdateAllocatedSpaceLimits(base, base + commit_size);
472 } else { 472 } else {
473 base = NULL; 473 base = NULL;
474 } 474 }
475 } 475 }
476 476
477 if (base == NULL) { 477 if (base == NULL) {
478 // Failed to commit the body. Release the mapping and any partially 478 // Failed to commit the body. Release the mapping and any partially
479 // commited regions inside it. 479 // commited regions inside it.
480 reservation.Release(); 480 reservation.Release();
481 size_.Decrement(reserve_size);
481 return NULL; 482 return NULL;
482 } 483 }
483 484
484 controller->TakeControl(&reservation); 485 controller->TakeControl(&reservation);
485 return base; 486 return base;
486 } 487 }
487 488
488 void Page::InitializeAsAnchor(Space* space) { 489 void Page::InitializeAsAnchor(Space* space) {
489 set_owner(space); 490 set_owner(space);
490 set_next_chunk(this); 491 set_next_chunk(this);
(...skipping 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after
3230 object->ShortPrint(); 3231 object->ShortPrint();
3231 PrintF("\n"); 3232 PrintF("\n");
3232 } 3233 }
3233 printf(" --------------------------------------\n"); 3234 printf(" --------------------------------------\n");
3234 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3235 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3235 } 3236 }
3236 3237
3237 #endif // DEBUG 3238 #endif // DEBUG
3238 } // namespace internal 3239 } // namespace internal
3239 } // namespace v8 3240 } // namespace v8
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