| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 #endif | 270 #endif |
| 271 | 271 |
| 272 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) | 272 #if defined(DEBUG) || defined(ENABLE_LOGGING_AND_PROFILING) |
| 273 ReportStatisticsBeforeGC(); | 273 ReportStatisticsBeforeGC(); |
| 274 #endif | 274 #endif |
| 275 } | 275 } |
| 276 | 276 |
| 277 int Heap::SizeOfObjects() { | 277 int Heap::SizeOfObjects() { |
| 278 int total = 0; | 278 int total = 0; |
| 279 AllSpaces spaces; | 279 AllSpaces spaces; |
| 280 while (Space* space = spaces.next()) total += space->Size(); | 280 while (Space* space = spaces.next()) { |
| 281 total += space->Size(); |
| 282 } |
| 281 return total; | 283 return total; |
| 282 } | 284 } |
| 283 | 285 |
| 284 void Heap::GarbageCollectionEpilogue() { | 286 void Heap::GarbageCollectionEpilogue() { |
| 285 #ifdef DEBUG | 287 #ifdef DEBUG |
| 286 allow_allocation(true); | 288 allow_allocation(true); |
| 287 ZapFromSpace(); | 289 ZapFromSpace(); |
| 288 | 290 |
| 289 if (FLAG_verify_heap) { | 291 if (FLAG_verify_heap) { |
| 290 Verify(); | 292 Verify(); |
| (...skipping 3574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3865 #ifdef DEBUG | 3867 #ifdef DEBUG |
| 3866 bool Heap::GarbageCollectionGreedyCheck() { | 3868 bool Heap::GarbageCollectionGreedyCheck() { |
| 3867 ASSERT(FLAG_gc_greedy); | 3869 ASSERT(FLAG_gc_greedy); |
| 3868 if (Bootstrapper::IsActive()) return true; | 3870 if (Bootstrapper::IsActive()) return true; |
| 3869 if (disallow_allocation_failure()) return true; | 3871 if (disallow_allocation_failure()) return true; |
| 3870 return CollectGarbage(0, NEW_SPACE); | 3872 return CollectGarbage(0, NEW_SPACE); |
| 3871 } | 3873 } |
| 3872 #endif | 3874 #endif |
| 3873 | 3875 |
| 3874 } } // namespace v8::internal | 3876 } } // namespace v8::internal |
| OLD | NEW |