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

Side by Side Diff: src/heap/heap.h

Issue 2209583002: [heap] Remove border page (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Allow empty intermediate generation 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 | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 int64_t total = PromotedSpaceSizeOfObjects() + PromotedExternalMemorySize(); 1357 int64_t total = PromotedSpaceSizeOfObjects() + PromotedExternalMemorySize();
1358 if (total > std::numeric_limits<intptr_t>::max()) { 1358 if (total > std::numeric_limits<intptr_t>::max()) {
1359 // TODO(erikcorry): Use uintptr_t everywhere we do heap size calculations. 1359 // TODO(erikcorry): Use uintptr_t everywhere we do heap size calculations.
1360 return std::numeric_limits<intptr_t>::max(); 1360 return std::numeric_limits<intptr_t>::max();
1361 } 1361 }
1362 if (total < 0) return 0; 1362 if (total < 0) return 0;
1363 return static_cast<intptr_t>(total); 1363 return static_cast<intptr_t>(total);
1364 } 1364 }
1365 1365
1366 inline void UpdateNewSpaceAllocationCounter(); 1366 inline void UpdateNewSpaceAllocationCounter();
1367
1368 inline size_t NewSpaceAllocationCounter(); 1367 inline size_t NewSpaceAllocationCounter();
1369 1368
1370 // This should be used only for testing. 1369 // This should be used only for testing.
1371 void set_new_space_allocation_counter(size_t new_value) { 1370 void set_new_space_allocation_counter(size_t new_value) {
1372 new_space_allocation_counter_ = new_value; 1371 new_space_allocation_counter_ = new_value;
1373 } 1372 }
1374 1373
1375 void UpdateOldGenerationAllocationCounter() { 1374 void UpdateOldGenerationAllocationCounter() {
1376 old_generation_allocation_counter_ = OldGenerationAllocationCounter(); 1375 old_generation_allocation_counter_ = OldGenerationAllocationCounter();
1377 } 1376 }
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 friend class LargeObjectSpace; 2640 friend class LargeObjectSpace;
2642 friend class NewSpace; 2641 friend class NewSpace;
2643 friend class PagedSpace; 2642 friend class PagedSpace;
2644 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); 2643 DISALLOW_COPY_AND_ASSIGN(AllocationObserver);
2645 }; 2644 };
2646 2645
2647 } // namespace internal 2646 } // namespace internal
2648 } // namespace v8 2647 } // namespace v8
2649 2648
2650 #endif // V8_HEAP_HEAP_H_ 2649 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698