| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 bool Heap::InOldPointerSpace(Address address) { | 338 bool Heap::InOldPointerSpace(Address address) { |
| 339 return old_pointer_space_->Contains(address); | 339 return old_pointer_space_->Contains(address); |
| 340 } | 340 } |
| 341 | 341 |
| 342 | 342 |
| 343 bool Heap::InOldPointerSpace(Object* object) { | 343 bool Heap::InOldPointerSpace(Object* object) { |
| 344 return InOldPointerSpace(reinterpret_cast<Address>(object)); | 344 return InOldPointerSpace(reinterpret_cast<Address>(object)); |
| 345 } | 345 } |
| 346 | 346 |
| 347 | 347 |
| 348 bool Heap::InOldDataSpace(Address address) { |
| 349 return old_data_space_->Contains(address); |
| 350 } |
| 351 |
| 352 |
| 353 bool Heap::InOldDataSpace(Object* object) { |
| 354 return InOldDataSpace(reinterpret_cast<Address>(object)); |
| 355 } |
| 356 |
| 357 |
| 348 bool Heap::OldGenerationAllocationLimitReached() { | 358 bool Heap::OldGenerationAllocationLimitReached() { |
| 349 if (!incremental_marking()->IsStopped()) return false; | 359 if (!incremental_marking()->IsStopped()) return false; |
| 350 return OldGenerationSpaceAvailable() < 0; | 360 return OldGenerationSpaceAvailable() < 0; |
| 351 } | 361 } |
| 352 | 362 |
| 353 | 363 |
| 354 bool Heap::ShouldBePromoted(Address old_address, int object_size) { | 364 bool Heap::ShouldBePromoted(Address old_address, int object_size) { |
| 355 // An object should be promoted if: | 365 // An object should be promoted if: |
| 356 // - the object has survived a scavenge operation or | 366 // - the object has survived a scavenge operation or |
| 357 // - to space is already 25% full. | 367 // - to space is already 25% full. |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 AssertNoAllocation::~AssertNoAllocation() { } | 876 AssertNoAllocation::~AssertNoAllocation() { } |
| 867 DisableAssertNoAllocation::DisableAssertNoAllocation() { } | 877 DisableAssertNoAllocation::DisableAssertNoAllocation() { } |
| 868 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } | 878 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } |
| 869 | 879 |
| 870 #endif | 880 #endif |
| 871 | 881 |
| 872 | 882 |
| 873 } } // namespace v8::internal | 883 } } // namespace v8::internal |
| 874 | 884 |
| 875 #endif // V8_HEAP_INL_H_ | 885 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |