OLD | NEW |
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 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 DisallowHeapAllocation no_recursive_gc; | 888 DisallowHeapAllocation no_recursive_gc; |
889 isolate()->optimizing_compile_dispatcher()->Flush(); | 889 isolate()->optimizing_compile_dispatcher()->Flush(); |
890 } | 890 } |
891 isolate()->ClearSerializerData(); | 891 isolate()->ClearSerializerData(); |
892 set_current_gc_flags(kMakeHeapIterableMask | kReduceMemoryFootprintMask); | 892 set_current_gc_flags(kMakeHeapIterableMask | kReduceMemoryFootprintMask); |
893 isolate_->compilation_cache()->Clear(); | 893 isolate_->compilation_cache()->Clear(); |
894 const int kMaxNumberOfAttempts = 7; | 894 const int kMaxNumberOfAttempts = 7; |
895 const int kMinNumberOfAttempts = 2; | 895 const int kMinNumberOfAttempts = 2; |
896 for (int attempt = 0; attempt < kMaxNumberOfAttempts; attempt++) { | 896 for (int attempt = 0; attempt < kMaxNumberOfAttempts; attempt++) { |
897 if (!CollectGarbage(MARK_COMPACTOR, gc_reason, NULL, | 897 if (!CollectGarbage(MARK_COMPACTOR, gc_reason, NULL, |
898 v8::kGCCallbackFlagCollectAllAvailableGarbage) && | 898 v8::kGCCallbackFlagForced) && |
899 attempt + 1 >= kMinNumberOfAttempts) { | 899 attempt + 1 >= kMinNumberOfAttempts) { |
900 break; | 900 break; |
901 } | 901 } |
902 } | 902 } |
903 set_current_gc_flags(kNoGCFlags); | 903 set_current_gc_flags(kNoGCFlags); |
904 new_space_.Shrink(); | 904 new_space_.Shrink(); |
905 UncommitFromSpace(); | 905 UncommitFromSpace(); |
906 } | 906 } |
907 | 907 |
908 | 908 |
(...skipping 5435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6344 } | 6344 } |
6345 | 6345 |
6346 | 6346 |
6347 // static | 6347 // static |
6348 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6348 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6349 return StaticVisitorBase::GetVisitorId(map); | 6349 return StaticVisitorBase::GetVisitorId(map); |
6350 } | 6350 } |
6351 | 6351 |
6352 } // namespace internal | 6352 } // namespace internal |
6353 } // namespace v8 | 6353 } // namespace v8 |
OLD | NEW |