| 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 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3341 return true; | 3341 return true; |
| 3342 } | 3342 } |
| 3343 | 3343 |
| 3344 | 3344 |
| 3345 bool Heap::ConfigureHeapDefault() { | 3345 bool Heap::ConfigureHeapDefault() { |
| 3346 return ConfigureHeap(FLAG_max_new_space_size / 2, FLAG_max_old_space_size); | 3346 return ConfigureHeap(FLAG_max_new_space_size / 2, FLAG_max_old_space_size); |
| 3347 } | 3347 } |
| 3348 | 3348 |
| 3349 | 3349 |
| 3350 void Heap::RecordStats(HeapStats* stats) { | 3350 void Heap::RecordStats(HeapStats* stats) { |
| 3351 stats->new_space_size = new_space_.Size(); | 3351 *stats->start_marker = 0xDECADE00; |
| 3352 stats->new_space_capacity = new_space_.Capacity(); | 3352 *stats->end_marker = 0xDECADE01; |
| 3353 stats->old_pointer_space_size = old_pointer_space_->Size(); | 3353 *stats->new_space_size = new_space_.Size(); |
| 3354 stats->old_pointer_space_capacity = old_pointer_space_->Capacity(); | 3354 *stats->new_space_capacity = new_space_.Capacity(); |
| 3355 stats->old_data_space_size = old_data_space_->Size(); | 3355 *stats->old_pointer_space_size = old_pointer_space_->Size(); |
| 3356 stats->old_data_space_capacity = old_data_space_->Capacity(); | 3356 *stats->old_pointer_space_capacity = old_pointer_space_->Capacity(); |
| 3357 stats->code_space_size = code_space_->Size(); | 3357 *stats->old_data_space_size = old_data_space_->Size(); |
| 3358 stats->code_space_capacity = code_space_->Capacity(); | 3358 *stats->old_data_space_capacity = old_data_space_->Capacity(); |
| 3359 stats->map_space_size = map_space_->Size(); | 3359 *stats->code_space_size = code_space_->Size(); |
| 3360 stats->map_space_capacity = map_space_->Capacity(); | 3360 *stats->code_space_capacity = code_space_->Capacity(); |
| 3361 stats->cell_space_size = cell_space_->Size(); | 3361 *stats->map_space_size = map_space_->Size(); |
| 3362 stats->cell_space_capacity = cell_space_->Capacity(); | 3362 *stats->map_space_capacity = map_space_->Capacity(); |
| 3363 stats->lo_space_size = lo_space_->Size(); | 3363 *stats->cell_space_size = cell_space_->Size(); |
| 3364 *stats->cell_space_capacity = cell_space_->Capacity(); |
| 3365 *stats->lo_space_size = lo_space_->Size(); |
| 3364 GlobalHandles::RecordStats(stats); | 3366 GlobalHandles::RecordStats(stats); |
| 3365 } | 3367 } |
| 3366 | 3368 |
| 3367 | 3369 |
| 3368 int Heap::PromotedSpaceSize() { | 3370 int Heap::PromotedSpaceSize() { |
| 3369 return old_pointer_space_->Size() | 3371 return old_pointer_space_->Size() |
| 3370 + old_data_space_->Size() | 3372 + old_data_space_->Size() |
| 3371 + code_space_->Size() | 3373 + code_space_->Size() |
| 3372 + map_space_->Size() | 3374 + map_space_->Size() |
| 3373 + cell_space_->Size() | 3375 + cell_space_->Size() |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4053 for (int i = 0; i < kNumberOfCaches; i++) { | 4055 for (int i = 0; i < kNumberOfCaches; i++) { |
| 4054 if (caches_[i] != NULL) { | 4056 if (caches_[i] != NULL) { |
| 4055 delete caches_[i]; | 4057 delete caches_[i]; |
| 4056 caches_[i] = NULL; | 4058 caches_[i] = NULL; |
| 4057 } | 4059 } |
| 4058 } | 4060 } |
| 4059 } | 4061 } |
| 4060 | 4062 |
| 4061 | 4063 |
| 4062 } } // namespace v8::internal | 4064 } } // namespace v8::internal |
| OLD | NEW |