OLD | NEW |
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 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3074 } | 3074 } |
3075 | 3075 |
3076 | 3076 |
3077 bool Heap::IdleNotification() { | 3077 bool Heap::IdleNotification() { |
3078 static const int kIdlesBeforeScavenge = 4; | 3078 static const int kIdlesBeforeScavenge = 4; |
3079 static const int kIdlesBeforeMarkSweep = 7; | 3079 static const int kIdlesBeforeMarkSweep = 7; |
3080 static const int kIdlesBeforeMarkCompact = 8; | 3080 static const int kIdlesBeforeMarkCompact = 8; |
3081 static int number_idle_notifications = 0; | 3081 static int number_idle_notifications = 0; |
3082 static int last_gc_count = gc_count_; | 3082 static int last_gc_count = gc_count_; |
3083 | 3083 |
3084 if (!FLAG_expose_gc && (contexts_disposed_ > 0)) { | 3084 if (contexts_disposed_ > 0) { |
3085 HistogramTimerScope scope(&Counters::gc_context); | 3085 HistogramTimerScope scope(&Counters::gc_context); |
3086 CollectAllGarbage(false); | 3086 CollectAllGarbage(false); |
3087 ASSERT(contexts_disposed_ == 0); | 3087 ASSERT(contexts_disposed_ == 0); |
3088 return false; | 3088 return false; |
3089 } | 3089 } |
3090 | 3090 |
3091 bool finished = false; | 3091 bool finished = false; |
3092 | 3092 |
3093 if (last_gc_count == gc_count_) { | 3093 if (last_gc_count == gc_count_) { |
3094 number_idle_notifications++; | 3094 number_idle_notifications++; |
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4238 void ExternalStringTable::TearDown() { | 4238 void ExternalStringTable::TearDown() { |
4239 new_space_strings_.Free(); | 4239 new_space_strings_.Free(); |
4240 old_space_strings_.Free(); | 4240 old_space_strings_.Free(); |
4241 } | 4241 } |
4242 | 4242 |
4243 | 4243 |
4244 List<Object*> ExternalStringTable::new_space_strings_; | 4244 List<Object*> ExternalStringTable::new_space_strings_; |
4245 List<Object*> ExternalStringTable::old_space_strings_; | 4245 List<Object*> ExternalStringTable::old_space_strings_; |
4246 | 4246 |
4247 } } // namespace v8::internal | 4247 } } // namespace v8::internal |
OLD | NEW |