| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 | 305 |
| 306 // ----------------------------------------------------------------------------- | 306 // ----------------------------------------------------------------------------- |
| 307 // MemoryAllocator | 307 // MemoryAllocator |
| 308 | 308 |
| 309 void MemoryAllocator::ChunkInfo::init(Address a, size_t s, PagedSpace* o) { | 309 void MemoryAllocator::ChunkInfo::init(Address a, size_t s, PagedSpace* o) { |
| 310 address_ = a; | 310 address_ = a; |
| 311 size_ = s; | 311 size_ = s; |
| 312 owner_ = o; | 312 owner_ = o; |
| 313 executable_ = (o == NULL) ? NOT_EXECUTABLE : o->executable(); | 313 executable_ = (o == NULL) ? NOT_EXECUTABLE : o->executable(); |
| 314 owner_identity_ = (o == NULL) ? FIRST_SPACE : o->identity(); |
| 314 } | 315 } |
| 315 | 316 |
| 316 | 317 |
| 317 bool MemoryAllocator::IsValidChunk(int chunk_id) { | 318 bool MemoryAllocator::IsValidChunk(int chunk_id) { |
| 318 if (!IsValidChunkId(chunk_id)) return false; | 319 if (!IsValidChunkId(chunk_id)) return false; |
| 319 | 320 |
| 320 ChunkInfo& c = chunks_[chunk_id]; | 321 ChunkInfo& c = chunks_[chunk_id]; |
| 321 return (c.address() != NULL) && (c.size() != 0) && (c.owner() != NULL); | 322 return (c.address() != NULL) && (c.size() != 0) && (c.owner() != NULL); |
| 322 } | 323 } |
| 323 | 324 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 | 502 |
| 502 bool FreeListNode::IsFreeListNode(HeapObject* object) { | 503 bool FreeListNode::IsFreeListNode(HeapObject* object) { |
| 503 return object->map() == HEAP->raw_unchecked_byte_array_map() | 504 return object->map() == HEAP->raw_unchecked_byte_array_map() |
| 504 || object->map() == HEAP->raw_unchecked_one_pointer_filler_map() | 505 || object->map() == HEAP->raw_unchecked_one_pointer_filler_map() |
| 505 || object->map() == HEAP->raw_unchecked_two_pointer_filler_map(); | 506 || object->map() == HEAP->raw_unchecked_two_pointer_filler_map(); |
| 506 } | 507 } |
| 507 | 508 |
| 508 } } // namespace v8::internal | 509 } } // namespace v8::internal |
| 509 | 510 |
| 510 #endif // V8_SPACES_INL_H_ | 511 #endif // V8_SPACES_INL_H_ |
| OLD | NEW |