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 2593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2604 } | 2604 } |
2605 } | 2605 } |
2606 | 2606 |
2607 | 2607 |
2608 bool v8::V8::Dispose() { | 2608 bool v8::V8::Dispose() { |
2609 i::V8::TearDown(); | 2609 i::V8::TearDown(); |
2610 return true; | 2610 return true; |
2611 } | 2611 } |
2612 | 2612 |
2613 | 2613 |
| 2614 HeapStatistics::HeapStatistics(): total_heap_size_(0), used_heap_size_(0) { } |
| 2615 |
| 2616 |
| 2617 void v8::V8::GetHeapStatistics(HeapStatistics* heap_statistics) { |
| 2618 heap_statistics->set_total_heap_size(i::Heap::CommittedMemory()); |
| 2619 heap_statistics->set_used_heap_size(i::Heap::SizeOfObjects()); |
| 2620 } |
| 2621 |
| 2622 |
2614 bool v8::V8::IdleNotification() { | 2623 bool v8::V8::IdleNotification() { |
2615 // Returning true tells the caller that it need not | 2624 // Returning true tells the caller that it need not |
2616 // continue to call IdleNotification. | 2625 // continue to call IdleNotification. |
2617 if (!i::V8::IsRunning()) return true; | 2626 if (!i::V8::IsRunning()) return true; |
2618 return i::V8::IdleNotification(); | 2627 return i::V8::IdleNotification(); |
2619 } | 2628 } |
2620 | 2629 |
2621 | 2630 |
2622 void v8::V8::LowMemoryNotification() { | 2631 void v8::V8::LowMemoryNotification() { |
2623 #if defined(ANDROID) | 2632 #if defined(ANDROID) |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3803 | 3812 |
3804 | 3813 |
3805 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 3814 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
3806 HandleScopeImplementer* thread_local = | 3815 HandleScopeImplementer* thread_local = |
3807 reinterpret_cast<HandleScopeImplementer*>(storage); | 3816 reinterpret_cast<HandleScopeImplementer*>(storage); |
3808 thread_local->IterateThis(v); | 3817 thread_local->IterateThis(v); |
3809 return storage + ArchiveSpacePerThread(); | 3818 return storage + ArchiveSpacePerThread(); |
3810 } | 3819 } |
3811 | 3820 |
3812 } } // namespace v8::internal | 3821 } } // namespace v8::internal |
OLD | NEW |