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

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

Issue 1570443004: [heap] Enfoce tighter allocation limit for large object allocations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 815
816 Address* OldSpaceAllocationTopAddress() { 816 Address* OldSpaceAllocationTopAddress() {
817 return old_space_->allocation_top_address(); 817 return old_space_->allocation_top_address();
818 } 818 }
819 Address* OldSpaceAllocationLimitAddress() { 819 Address* OldSpaceAllocationLimitAddress() {
820 return old_space_->allocation_limit_address(); 820 return old_space_->allocation_limit_address();
821 } 821 }
822 822
823 // TODO(hpayer): There is still a missmatch between capacity and actual 823 // TODO(hpayer): There is still a missmatch between capacity and actual
824 // committed memory size. 824 // committed memory size.
825 bool CanExpandOldGeneration(int size) { 825 bool CanExpandOldGeneration(int size = 0) {
826 if (force_oom_) return false; 826 if (force_oom_) return false;
827 return (CommittedOldGenerationMemory() + size) < MaxOldGenerationSize(); 827 return (CommittedOldGenerationMemory() + size) < MaxOldGenerationSize();
828 } 828 }
829 829
830 // Clear the Instanceof cache (used when a prototype changes). 830 // Clear the Instanceof cache (used when a prototype changes).
831 inline void ClearInstanceofCache(); 831 inline void ClearInstanceofCache();
832 832
833 // FreeSpace objects have a null map after deserialization. Update the map. 833 // FreeSpace objects have a null map after deserialization. Update the map.
834 void RepairFreeListsAfterDeserialization(); 834 void RepairFreeListsAfterDeserialization();
835 835
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
2755 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2755 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2756 2756
2757 private: 2757 private:
2758 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2758 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2759 }; 2759 };
2760 #endif // DEBUG 2760 #endif // DEBUG
2761 } // namespace internal 2761 } // namespace internal
2762 } // namespace v8 2762 } // namespace v8
2763 2763
2764 #endif // V8_HEAP_HEAP_H_ 2764 #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