OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 | 393 |
394 intptr_t Heap::SizeOfObjects() { | 394 intptr_t Heap::SizeOfObjects() { |
395 intptr_t total = 0; | 395 intptr_t total = 0; |
396 AllSpaces spaces; | 396 AllSpaces spaces; |
397 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) { | 397 for (Space* space = spaces.next(); space != NULL; space = spaces.next()) { |
398 total += space->Size(); | 398 total += space->Size(); |
399 } | 399 } |
400 return total; | 400 return total; |
401 } | 401 } |
402 | 402 |
| 403 intptr_t Heap::SizeOfObjectsSlow() { |
| 404 intptr_t total = 0; |
| 405 HeapIterator iterator; |
| 406 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) { |
| 407 if (!FreeListNode::IsFreeListNode(obj)) { |
| 408 total += obj->Size(); |
| 409 } |
| 410 } |
| 411 return total; |
| 412 } |
| 413 |
403 void Heap::GarbageCollectionEpilogue() { | 414 void Heap::GarbageCollectionEpilogue() { |
404 #ifdef DEBUG | 415 #ifdef DEBUG |
405 allow_allocation(true); | 416 allow_allocation(true); |
406 ZapFromSpace(); | 417 ZapFromSpace(); |
407 | 418 |
408 if (FLAG_verify_heap) { | 419 if (FLAG_verify_heap) { |
409 Verify(); | 420 Verify(); |
410 } | 421 } |
411 | 422 |
412 if (FLAG_print_global_handles) GlobalHandles::Print(); | 423 if (FLAG_print_global_handles) GlobalHandles::Print(); |
(...skipping 4873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5286 void ExternalStringTable::TearDown() { | 5297 void ExternalStringTable::TearDown() { |
5287 new_space_strings_.Free(); | 5298 new_space_strings_.Free(); |
5288 old_space_strings_.Free(); | 5299 old_space_strings_.Free(); |
5289 } | 5300 } |
5290 | 5301 |
5291 | 5302 |
5292 List<Object*> ExternalStringTable::new_space_strings_; | 5303 List<Object*> ExternalStringTable::new_space_strings_; |
5293 List<Object*> ExternalStringTable::old_space_strings_; | 5304 List<Object*> ExternalStringTable::old_space_strings_; |
5294 | 5305 |
5295 } } // namespace v8::internal | 5306 } } // namespace v8::internal |
OLD | NEW |