| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HEAP_SPACES_INL_H_ | 5 #ifndef V8_HEAP_SPACES_INL_H_ |
| 6 #define V8_HEAP_SPACES_INL_H_ | 6 #define V8_HEAP_SPACES_INL_H_ |
| 7 | 7 |
| 8 #include "src/heap/spaces.h" | 8 #include "src/heap/spaces.h" |
| 9 #include "src/heap-profiler.h" | 9 #include "src/heap-profiler.h" |
| 10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // to another chunk. See the comment to Page::FromAllocationTop. | 199 // to another chunk. See the comment to Page::FromAllocationTop. |
| 200 MemoryChunk* chunk = MemoryChunk::FromAddress(mark - 1); | 200 MemoryChunk* chunk = MemoryChunk::FromAddress(mark - 1); |
| 201 int new_mark = static_cast<int>(mark - chunk->address()); | 201 int new_mark = static_cast<int>(mark - chunk->address()); |
| 202 if (new_mark > chunk->high_water_mark_) { | 202 if (new_mark > chunk->high_water_mark_) { |
| 203 chunk->high_water_mark_ = new_mark; | 203 chunk->high_water_mark_ = new_mark; |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 | 206 |
| 207 | 207 |
| 208 PointerChunkIterator::PointerChunkIterator(Heap* heap) | 208 PointerChunkIterator::PointerChunkIterator(Heap* heap) |
| 209 : state_(kOldPointerState), | 209 : state_(kOldSpaceState), |
| 210 old_pointer_iterator_(heap->old_pointer_space()), | 210 old_iterator_(heap->old_space()), |
| 211 map_iterator_(heap->map_space()), | 211 map_iterator_(heap->map_space()), |
| 212 lo_iterator_(heap->lo_space()) {} | 212 lo_iterator_(heap->lo_space()) {} |
| 213 | 213 |
| 214 | 214 |
| 215 Page* Page::next_page() { | 215 Page* Page::next_page() { |
| 216 DCHECK(next_chunk()->owner() == owner()); | 216 DCHECK(next_chunk()->owner() == owner()); |
| 217 return static_cast<Page*>(next_chunk()); | 217 return static_cast<Page*>(next_chunk()); |
| 218 } | 218 } |
| 219 | 219 |
| 220 | 220 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 302 |
| 303 | 303 |
| 304 intptr_t LargeObjectSpace::Available() { | 304 intptr_t LargeObjectSpace::Available() { |
| 305 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available()); | 305 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available()); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } | 308 } |
| 309 } // namespace v8::internal | 309 } // namespace v8::internal |
| 310 | 310 |
| 311 #endif // V8_HEAP_SPACES_INL_H_ | 311 #endif // V8_HEAP_SPACES_INL_H_ |
| OLD | NEW |