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

Side by Side Diff: src/heap.cc

Issue 151152: Create a separate space for global property cells (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/heap.h ('k') | src/heap-inl.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 SYMBOL_LIST(SYMBOL_ALLOCATION) 57 SYMBOL_LIST(SYMBOL_ALLOCATION)
58 #undef SYMBOL_ALLOCATION 58 #undef SYMBOL_ALLOCATION
59 59
60 String* Heap::hidden_symbol_; 60 String* Heap::hidden_symbol_;
61 61
62 NewSpace Heap::new_space_; 62 NewSpace Heap::new_space_;
63 OldSpace* Heap::old_pointer_space_ = NULL; 63 OldSpace* Heap::old_pointer_space_ = NULL;
64 OldSpace* Heap::old_data_space_ = NULL; 64 OldSpace* Heap::old_data_space_ = NULL;
65 OldSpace* Heap::code_space_ = NULL; 65 OldSpace* Heap::code_space_ = NULL;
66 MapSpace* Heap::map_space_ = NULL; 66 MapSpace* Heap::map_space_ = NULL;
67 GlobalPropertyCellSpace* Heap::global_property_cell_space_ = NULL;
67 LargeObjectSpace* Heap::lo_space_ = NULL; 68 LargeObjectSpace* Heap::lo_space_ = NULL;
68 69
69 static const int kMinimumPromotionLimit = 2*MB; 70 static const int kMinimumPromotionLimit = 2*MB;
70 static const int kMinimumAllocationLimit = 8*MB; 71 static const int kMinimumAllocationLimit = 8*MB;
71 72
72 int Heap::old_gen_promotion_limit_ = kMinimumPromotionLimit; 73 int Heap::old_gen_promotion_limit_ = kMinimumPromotionLimit;
73 int Heap::old_gen_allocation_limit_ = kMinimumAllocationLimit; 74 int Heap::old_gen_allocation_limit_ = kMinimumAllocationLimit;
74 75
75 int Heap::old_gen_exhausted_ = false; 76 int Heap::old_gen_exhausted_ = false;
76 77
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 #endif // DEBUG 115 #endif // DEBUG
115 116
116 117
117 int Heap::Capacity() { 118 int Heap::Capacity() {
118 if (!HasBeenSetup()) return 0; 119 if (!HasBeenSetup()) return 0;
119 120
120 return new_space_.Capacity() + 121 return new_space_.Capacity() +
121 old_pointer_space_->Capacity() + 122 old_pointer_space_->Capacity() +
122 old_data_space_->Capacity() + 123 old_data_space_->Capacity() +
123 code_space_->Capacity() + 124 code_space_->Capacity() +
124 map_space_->Capacity(); 125 map_space_->Capacity() +
126 global_property_cell_space_->Capacity();
125 } 127 }
126 128
127 129
128 int Heap::Available() { 130 int Heap::Available() {
129 if (!HasBeenSetup()) return 0; 131 if (!HasBeenSetup()) return 0;
130 132
131 return new_space_.Available() + 133 return new_space_.Available() +
132 old_pointer_space_->Available() + 134 old_pointer_space_->Available() +
133 old_data_space_->Available() + 135 old_data_space_->Available() +
134 code_space_->Available() + 136 code_space_->Available() +
135 map_space_->Available(); 137 map_space_->Available() +
138 global_property_cell_space_->Available();
136 } 139 }
137 140
138 141
139 bool Heap::HasBeenSetup() { 142 bool Heap::HasBeenSetup() {
140 return old_pointer_space_ != NULL && 143 return old_pointer_space_ != NULL &&
141 old_data_space_ != NULL && 144 old_data_space_ != NULL &&
142 code_space_ != NULL && 145 code_space_ != NULL &&
143 map_space_ != NULL && 146 map_space_ != NULL &&
147 global_property_cell_space_ != NULL &&
144 lo_space_ != NULL; 148 lo_space_ != NULL;
145 } 149 }
146 150
147 151
148 GarbageCollector Heap::SelectGarbageCollector(AllocationSpace space) { 152 GarbageCollector Heap::SelectGarbageCollector(AllocationSpace space) {
149 // Is global GC requested? 153 // Is global GC requested?
150 if (space != NEW_SPACE || FLAG_gc_global) { 154 if (space != NEW_SPACE || FLAG_gc_global) {
151 Counters::gc_compactor_caused_by_request.Increment(); 155 Counters::gc_compactor_caused_by_request.Increment();
152 return MARK_COMPACTOR; 156 return MARK_COMPACTOR;
153 } 157 }
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 case NEW_SPACE: 368 case NEW_SPACE:
365 return new_space_.Available() >= requested_size; 369 return new_space_.Available() >= requested_size;
366 case OLD_POINTER_SPACE: 370 case OLD_POINTER_SPACE:
367 return old_pointer_space_->Available() >= requested_size; 371 return old_pointer_space_->Available() >= requested_size;
368 case OLD_DATA_SPACE: 372 case OLD_DATA_SPACE:
369 return old_data_space_->Available() >= requested_size; 373 return old_data_space_->Available() >= requested_size;
370 case CODE_SPACE: 374 case CODE_SPACE:
371 return code_space_->Available() >= requested_size; 375 return code_space_->Available() >= requested_size;
372 case MAP_SPACE: 376 case MAP_SPACE:
373 return map_space_->Available() >= requested_size; 377 return map_space_->Available() >= requested_size;
378 case GLOBAL_PROPERTY_CELL_SPACE:
379 return global_property_cell_space_->Available() >= requested_size;
374 case LO_SPACE: 380 case LO_SPACE:
375 return lo_space_->Available() >= requested_size; 381 return lo_space_->Available() >= requested_size;
376 } 382 }
377 return false; 383 return false;
378 } 384 }
379 385
380 386
381 void Heap::PerformScavenge() { 387 void Heap::PerformScavenge() {
382 GCTracer tracer; 388 GCTracer tracer;
383 PerformGarbageCollection(NEW_SPACE, SCAVENGER, &tracer); 389 PerformGarbageCollection(NEW_SPACE, SCAVENGER, &tracer);
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 } 1007 }
1002 1008
1003 1009
1004 void Heap::ScavengePointer(HeapObject** p) { 1010 void Heap::ScavengePointer(HeapObject** p) {
1005 ScavengeObject(p, *p); 1011 ScavengeObject(p, *p);
1006 } 1012 }
1007 1013
1008 1014
1009 Object* Heap::AllocatePartialMap(InstanceType instance_type, 1015 Object* Heap::AllocatePartialMap(InstanceType instance_type,
1010 int instance_size) { 1016 int instance_size) {
1011 Object* result = AllocateRawMap(Map::kSize); 1017 Object* result = AllocateRawMap();
1012 if (result->IsFailure()) return result; 1018 if (result->IsFailure()) return result;
1013 1019
1014 // Map::cast cannot be used due to uninitialized map field. 1020 // Map::cast cannot be used due to uninitialized map field.
1015 reinterpret_cast<Map*>(result)->set_map(meta_map()); 1021 reinterpret_cast<Map*>(result)->set_map(meta_map());
1016 reinterpret_cast<Map*>(result)->set_instance_type(instance_type); 1022 reinterpret_cast<Map*>(result)->set_instance_type(instance_type);
1017 reinterpret_cast<Map*>(result)->set_instance_size(instance_size); 1023 reinterpret_cast<Map*>(result)->set_instance_size(instance_size);
1018 reinterpret_cast<Map*>(result)->set_inobject_properties(0); 1024 reinterpret_cast<Map*>(result)->set_inobject_properties(0);
1019 reinterpret_cast<Map*>(result)->set_unused_property_fields(0); 1025 reinterpret_cast<Map*>(result)->set_unused_property_fields(0);
1020 return result; 1026 return result;
1021 } 1027 }
1022 1028
1023 1029
1024 Object* Heap::AllocateMap(InstanceType instance_type, int instance_size) { 1030 Object* Heap::AllocateMap(InstanceType instance_type, int instance_size) {
1025 Object* result = AllocateRawMap(Map::kSize); 1031 Object* result = AllocateRawMap();
1026 if (result->IsFailure()) return result; 1032 if (result->IsFailure()) return result;
1027 1033
1028 Map* map = reinterpret_cast<Map*>(result); 1034 Map* map = reinterpret_cast<Map*>(result);
1029 map->set_map(meta_map()); 1035 map->set_map(meta_map());
1030 map->set_instance_type(instance_type); 1036 map->set_instance_type(instance_type);
1031 map->set_prototype(null_value()); 1037 map->set_prototype(null_value());
1032 map->set_constructor(null_value()); 1038 map->set_constructor(null_value());
1033 map->set_instance_size(instance_size); 1039 map->set_instance_size(instance_size);
1034 map->set_inobject_properties(0); 1040 map->set_inobject_properties(0);
1035 map->set_instance_descriptors(empty_descriptor_array()); 1041 map->set_instance_descriptors(empty_descriptor_array());
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
2678 PrintF("To space : "); 2684 PrintF("To space : ");
2679 new_space_.ReportStatistics(); 2685 new_space_.ReportStatistics();
2680 PrintF("Old pointer space : "); 2686 PrintF("Old pointer space : ");
2681 old_pointer_space_->ReportStatistics(); 2687 old_pointer_space_->ReportStatistics();
2682 PrintF("Old data space : "); 2688 PrintF("Old data space : ");
2683 old_data_space_->ReportStatistics(); 2689 old_data_space_->ReportStatistics();
2684 PrintF("Code space : "); 2690 PrintF("Code space : ");
2685 code_space_->ReportStatistics(); 2691 code_space_->ReportStatistics();
2686 PrintF("Map space : "); 2692 PrintF("Map space : ");
2687 map_space_->ReportStatistics(); 2693 map_space_->ReportStatistics();
2694 PrintF("Global property cell space : ");
2695 global_property_cell_space_->ReportStatistics();
2688 PrintF("Large object space : "); 2696 PrintF("Large object space : ");
2689 lo_space_->ReportStatistics(); 2697 lo_space_->ReportStatistics();
2690 PrintF(">>>>>> ========================================= >>>>>>\n"); 2698 PrintF(">>>>>> ========================================= >>>>>>\n");
2691 } 2699 }
2692 2700
2693 #endif // DEBUG 2701 #endif // DEBUG
2694 2702
2695 bool Heap::Contains(HeapObject* value) { 2703 bool Heap::Contains(HeapObject* value) {
2696 return Contains(value->address()); 2704 return Contains(value->address());
2697 } 2705 }
2698 2706
2699 2707
2700 bool Heap::Contains(Address addr) { 2708 bool Heap::Contains(Address addr) {
2701 if (OS::IsOutsideAllocatedSpace(addr)) return false; 2709 if (OS::IsOutsideAllocatedSpace(addr)) return false;
2702 return HasBeenSetup() && 2710 return HasBeenSetup() &&
2703 (new_space_.ToSpaceContains(addr) || 2711 (new_space_.ToSpaceContains(addr) ||
2704 old_pointer_space_->Contains(addr) || 2712 old_pointer_space_->Contains(addr) ||
2705 old_data_space_->Contains(addr) || 2713 old_data_space_->Contains(addr) ||
2706 code_space_->Contains(addr) || 2714 code_space_->Contains(addr) ||
2707 map_space_->Contains(addr) || 2715 map_space_->Contains(addr) ||
2716 global_property_cell_space_->Contains(addr) ||
2708 lo_space_->SlowContains(addr)); 2717 lo_space_->SlowContains(addr));
2709 } 2718 }
2710 2719
2711 2720
2712 bool Heap::InSpace(HeapObject* value, AllocationSpace space) { 2721 bool Heap::InSpace(HeapObject* value, AllocationSpace space) {
2713 return InSpace(value->address(), space); 2722 return InSpace(value->address(), space);
2714 } 2723 }
2715 2724
2716 2725
2717 bool Heap::InSpace(Address addr, AllocationSpace space) { 2726 bool Heap::InSpace(Address addr, AllocationSpace space) {
2718 if (OS::IsOutsideAllocatedSpace(addr)) return false; 2727 if (OS::IsOutsideAllocatedSpace(addr)) return false;
2719 if (!HasBeenSetup()) return false; 2728 if (!HasBeenSetup()) return false;
2720 2729
2721 switch (space) { 2730 switch (space) {
2722 case NEW_SPACE: 2731 case NEW_SPACE:
2723 return new_space_.ToSpaceContains(addr); 2732 return new_space_.ToSpaceContains(addr);
2724 case OLD_POINTER_SPACE: 2733 case OLD_POINTER_SPACE:
2725 return old_pointer_space_->Contains(addr); 2734 return old_pointer_space_->Contains(addr);
2726 case OLD_DATA_SPACE: 2735 case OLD_DATA_SPACE:
2727 return old_data_space_->Contains(addr); 2736 return old_data_space_->Contains(addr);
2728 case CODE_SPACE: 2737 case CODE_SPACE:
2729 return code_space_->Contains(addr); 2738 return code_space_->Contains(addr);
2730 case MAP_SPACE: 2739 case MAP_SPACE:
2731 return map_space_->Contains(addr); 2740 return map_space_->Contains(addr);
2741 case GLOBAL_PROPERTY_CELL_SPACE:
2742 return global_property_cell_space_->Contains(addr);
2732 case LO_SPACE: 2743 case LO_SPACE:
2733 return lo_space_->SlowContains(addr); 2744 return lo_space_->SlowContains(addr);
2734 } 2745 }
2735 2746
2736 return false; 2747 return false;
2737 } 2748 }
2738 2749
2739 2750
2740 #ifdef DEBUG 2751 #ifdef DEBUG
2741 void Heap::Verify() { 2752 void Heap::Verify() {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
2957 bool Heap::ConfigureHeapDefault() { 2968 bool Heap::ConfigureHeapDefault() {
2958 return ConfigureHeap(FLAG_new_space_size, FLAG_old_space_size); 2969 return ConfigureHeap(FLAG_new_space_size, FLAG_old_space_size);
2959 } 2970 }
2960 2971
2961 2972
2962 int Heap::PromotedSpaceSize() { 2973 int Heap::PromotedSpaceSize() {
2963 return old_pointer_space_->Size() 2974 return old_pointer_space_->Size()
2964 + old_data_space_->Size() 2975 + old_data_space_->Size()
2965 + code_space_->Size() 2976 + code_space_->Size()
2966 + map_space_->Size() 2977 + map_space_->Size()
2978 + global_property_cell_space_->Size()
2967 + lo_space_->Size(); 2979 + lo_space_->Size();
2968 } 2980 }
2969 2981
2970 2982
2971 int Heap::PromotedExternalMemorySize() { 2983 int Heap::PromotedExternalMemorySize() {
2972 if (amount_of_external_allocated_memory_ 2984 if (amount_of_external_allocated_memory_
2973 <= amount_of_external_allocated_memory_at_last_global_gc_) return 0; 2985 <= amount_of_external_allocated_memory_at_last_global_gc_) return 0;
2974 return amount_of_external_allocated_memory_ 2986 return amount_of_external_allocated_memory_
2975 - amount_of_external_allocated_memory_at_last_global_gc_; 2987 - amount_of_external_allocated_memory_at_last_global_gc_;
2976 } 2988 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
3034 if (code_space_ == NULL) return false; 3046 if (code_space_ == NULL) return false;
3035 if (!code_space_->Setup(code_space_start, code_space_size)) return false; 3047 if (!code_space_->Setup(code_space_start, code_space_size)) return false;
3036 3048
3037 // Initialize map space. 3049 // Initialize map space.
3038 map_space_ = new MapSpace(kMaxMapSpaceSize, MAP_SPACE); 3050 map_space_ = new MapSpace(kMaxMapSpaceSize, MAP_SPACE);
3039 if (map_space_ == NULL) return false; 3051 if (map_space_ == NULL) return false;
3040 // Setting up a paged space without giving it a virtual memory range big 3052 // Setting up a paged space without giving it a virtual memory range big
3041 // enough to hold at least a page will cause it to allocate. 3053 // enough to hold at least a page will cause it to allocate.
3042 if (!map_space_->Setup(NULL, 0)) return false; 3054 if (!map_space_->Setup(NULL, 0)) return false;
3043 3055
3056 // Initialize global property cell space.
3057 global_property_cell_space_ =
3058 new GlobalPropertyCellSpace(kMaxMapSpaceSize, GLOBAL_PROPERTY_CELL_SPACE);
3059 if (global_property_cell_space_ == NULL) return false;
3060 // Setting up a paged space without giving it a virtual memory range big
3061 // enough to hold at least a page will cause it to allocate.
3062 if (!global_property_cell_space_->Setup(NULL, 0)) return false;
3063
3044 // The large object code space may contain code or data. We set the memory 3064 // The large object code space may contain code or data. We set the memory
3045 // to be non-executable here for safety, but this means we need to enable it 3065 // to be non-executable here for safety, but this means we need to enable it
3046 // explicitly when allocating large code objects. 3066 // explicitly when allocating large code objects.
3047 lo_space_ = new LargeObjectSpace(LO_SPACE); 3067 lo_space_ = new LargeObjectSpace(LO_SPACE);
3048 if (lo_space_ == NULL) return false; 3068 if (lo_space_ == NULL) return false;
3049 if (!lo_space_->Setup()) return false; 3069 if (!lo_space_->Setup()) return false;
3050 3070
3051 if (create_heap_objects) { 3071 if (create_heap_objects) {
3052 // Create initial maps. 3072 // Create initial maps.
3053 if (!CreateInitialMaps()) return false; 3073 if (!CreateInitialMaps()) return false;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3086 delete code_space_; 3106 delete code_space_;
3087 code_space_ = NULL; 3107 code_space_ = NULL;
3088 } 3108 }
3089 3109
3090 if (map_space_ != NULL) { 3110 if (map_space_ != NULL) {
3091 map_space_->TearDown(); 3111 map_space_->TearDown();
3092 delete map_space_; 3112 delete map_space_;
3093 map_space_ = NULL; 3113 map_space_ = NULL;
3094 } 3114 }
3095 3115
3116 if (global_property_cell_space_ != NULL) {
3117 global_property_cell_space_->TearDown();
3118 delete global_property_cell_space_;
3119 global_property_cell_space_ = NULL;
3120 }
3121
3096 if (lo_space_ != NULL) { 3122 if (lo_space_ != NULL) {
3097 lo_space_->TearDown(); 3123 lo_space_->TearDown();
3098 delete lo_space_; 3124 delete lo_space_;
3099 lo_space_ = NULL; 3125 lo_space_ = NULL;
3100 } 3126 }
3101 3127
3102 MemoryAllocator::TearDown(); 3128 MemoryAllocator::TearDown();
3103 } 3129 }
3104 3130
3105 3131
3106 void Heap::Shrink() { 3132 void Heap::Shrink() {
3107 // Try to shrink map, old, and code spaces. 3133 // Try to shrink global property cell, map, old, and code spaces.
3134 global_property_cell_space_->Shrink();
3108 map_space_->Shrink(); 3135 map_space_->Shrink();
3109 old_pointer_space_->Shrink(); 3136 old_pointer_space_->Shrink();
3110 old_data_space_->Shrink(); 3137 old_data_space_->Shrink();
3111 code_space_->Shrink(); 3138 code_space_->Shrink();
3112 } 3139 }
3113 3140
3114 3141
3115 #ifdef ENABLE_HEAP_PROTECTION 3142 #ifdef ENABLE_HEAP_PROTECTION
3116 3143
3117 void Heap::Protect() { 3144 void Heap::Protect() {
3118 if (HasBeenSetup()) { 3145 if (HasBeenSetup()) {
3119 new_space_.Protect(); 3146 new_space_.Protect();
3147 global_property_cell_space_->Protect();
3120 map_space_->Protect(); 3148 map_space_->Protect();
3121 old_pointer_space_->Protect(); 3149 old_pointer_space_->Protect();
3122 old_data_space_->Protect(); 3150 old_data_space_->Protect();
3123 code_space_->Protect(); 3151 code_space_->Protect();
3124 lo_space_->Protect(); 3152 lo_space_->Protect();
3125 } 3153 }
3126 } 3154 }
3127 3155
3128 3156
3129 void Heap::Unprotect() { 3157 void Heap::Unprotect() {
3130 if (HasBeenSetup()) { 3158 if (HasBeenSetup()) {
3131 new_space_.Unprotect(); 3159 new_space_.Unprotect();
3160 global_property_cell_space_->Unprotect();
3132 map_space_->Unprotect(); 3161 map_space_->Unprotect();
3133 old_pointer_space_->Unprotect(); 3162 old_pointer_space_->Unprotect();
3134 old_data_space_->Unprotect(); 3163 old_data_space_->Unprotect();
3135 code_space_->Unprotect(); 3164 code_space_->Unprotect();
3136 lo_space_->Unprotect(); 3165 lo_space_->Unprotect();
3137 } 3166 }
3138 } 3167 }
3139 3168
3140 #endif 3169 #endif
3141 3170
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
3255 break; 3284 break;
3256 case OLD_DATA_SPACE: 3285 case OLD_DATA_SPACE:
3257 iterator_ = new HeapObjectIterator(Heap::old_data_space()); 3286 iterator_ = new HeapObjectIterator(Heap::old_data_space());
3258 break; 3287 break;
3259 case CODE_SPACE: 3288 case CODE_SPACE:
3260 iterator_ = new HeapObjectIterator(Heap::code_space()); 3289 iterator_ = new HeapObjectIterator(Heap::code_space());
3261 break; 3290 break;
3262 case MAP_SPACE: 3291 case MAP_SPACE:
3263 iterator_ = new HeapObjectIterator(Heap::map_space()); 3292 iterator_ = new HeapObjectIterator(Heap::map_space());
3264 break; 3293 break;
3294 case GLOBAL_PROPERTY_CELL_SPACE:
3295 iterator_ = new HeapObjectIterator(Heap::global_property_cell_space());
3296 break;
3265 case LO_SPACE: 3297 case LO_SPACE:
3266 iterator_ = new LargeObjectIterator(Heap::lo_space()); 3298 iterator_ = new LargeObjectIterator(Heap::lo_space());
3267 break; 3299 break;
3268 } 3300 }
3269 3301
3270 // Return the newly allocated iterator; 3302 // Return the newly allocated iterator;
3271 ASSERT(iterator_ != NULL); 3303 ASSERT(iterator_ != NULL);
3272 return iterator_; 3304 return iterator_;
3273 } 3305 }
3274 3306
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
3657 #ifdef DEBUG 3689 #ifdef DEBUG
3658 bool Heap::GarbageCollectionGreedyCheck() { 3690 bool Heap::GarbageCollectionGreedyCheck() {
3659 ASSERT(FLAG_gc_greedy); 3691 ASSERT(FLAG_gc_greedy);
3660 if (Bootstrapper::IsActive()) return true; 3692 if (Bootstrapper::IsActive()) return true;
3661 if (disallow_allocation_failure()) return true; 3693 if (disallow_allocation_failure()) return true;
3662 return CollectGarbage(0, NEW_SPACE); 3694 return CollectGarbage(0, NEW_SPACE);
3663 } 3695 }
3664 #endif 3696 #endif
3665 3697
3666 } } // namespace v8::internal 3698 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698