| 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 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3349 heap_configured = true; | 3349 heap_configured = true; |
| 3350 return true; | 3350 return true; |
| 3351 } | 3351 } |
| 3352 | 3352 |
| 3353 | 3353 |
| 3354 bool Heap::ConfigureHeapDefault() { | 3354 bool Heap::ConfigureHeapDefault() { |
| 3355 return ConfigureHeap(FLAG_max_new_space_size / 2, FLAG_max_old_space_size); | 3355 return ConfigureHeap(FLAG_max_new_space_size / 2, FLAG_max_old_space_size); |
| 3356 } | 3356 } |
| 3357 | 3357 |
| 3358 | 3358 |
| 3359 void Heap::RecordStats(HeapStats* stats) { |
| 3360 stats->new_space_size = new_space_.Size(); |
| 3361 stats->new_space_capacity = new_space_.Capacity(); |
| 3362 stats->old_pointer_space_size = old_pointer_space_->Size(); |
| 3363 stats->old_pointer_space_capacity = old_pointer_space_->Capacity(); |
| 3364 stats->old_data_space_size = old_data_space_->Size(); |
| 3365 stats->old_data_space_capacity = old_data_space_->Capacity(); |
| 3366 stats->code_space_size = code_space_->Size(); |
| 3367 stats->code_space_capacity = code_space_->Capacity(); |
| 3368 stats->map_space_size = map_space_->Size(); |
| 3369 stats->map_space_capacity = map_space_->Capacity(); |
| 3370 stats->cell_space_size = cell_space_->Size(); |
| 3371 stats->cell_space_capacity = cell_space_->Capacity(); |
| 3372 stats->lo_space_size = lo_space_->Size(); |
| 3373 GlobalHandles::RecordStats(stats); |
| 3374 } |
| 3375 |
| 3376 |
| 3359 int Heap::PromotedSpaceSize() { | 3377 int Heap::PromotedSpaceSize() { |
| 3360 return old_pointer_space_->Size() | 3378 return old_pointer_space_->Size() |
| 3361 + old_data_space_->Size() | 3379 + old_data_space_->Size() |
| 3362 + code_space_->Size() | 3380 + code_space_->Size() |
| 3363 + map_space_->Size() | 3381 + map_space_->Size() |
| 3364 + cell_space_->Size() | 3382 + cell_space_->Size() |
| 3365 + lo_space_->Size(); | 3383 + lo_space_->Size(); |
| 3366 } | 3384 } |
| 3367 | 3385 |
| 3368 | 3386 |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4048 for (int i = 0; i < kNumberOfCaches; i++) { | 4066 for (int i = 0; i < kNumberOfCaches; i++) { |
| 4049 if (caches_[i] != NULL) { | 4067 if (caches_[i] != NULL) { |
| 4050 delete caches_[i]; | 4068 delete caches_[i]; |
| 4051 caches_[i] = NULL; | 4069 caches_[i] = NULL; |
| 4052 } | 4070 } |
| 4053 } | 4071 } |
| 4054 } | 4072 } |
| 4055 | 4073 |
| 4056 | 4074 |
| 4057 } } // namespace v8::internal | 4075 } } // namespace v8::internal |
| OLD | NEW |