| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  296  |  296  | 
|  297  |  297  | 
|  298 void Page::SetIsPageExecutable(bool is_page_executable) { |  298 void Page::SetIsPageExecutable(bool is_page_executable) { | 
|  299   SetPageFlag(IS_EXECUTABLE, is_page_executable); |  299   SetPageFlag(IS_EXECUTABLE, is_page_executable); | 
|  300 } |  300 } | 
|  301  |  301  | 
|  302  |  302  | 
|  303 // ----------------------------------------------------------------------------- |  303 // ----------------------------------------------------------------------------- | 
|  304 // MemoryAllocator |  304 // MemoryAllocator | 
|  305  |  305  | 
 |  306 void MemoryAllocator::ChunkInfo::init(Address a, size_t s, PagedSpace* o) { | 
 |  307   address_ = a; | 
 |  308   size_ = s; | 
 |  309   owner_ = o; | 
 |  310   executable_ = (o == NULL) ? NOT_EXECUTABLE : o->executable(); | 
 |  311 } | 
 |  312  | 
 |  313  | 
|  306 bool MemoryAllocator::IsValidChunk(int chunk_id) { |  314 bool MemoryAllocator::IsValidChunk(int chunk_id) { | 
|  307   if (!IsValidChunkId(chunk_id)) return false; |  315   if (!IsValidChunkId(chunk_id)) return false; | 
|  308  |  316  | 
|  309   ChunkInfo& c = chunks_[chunk_id]; |  317   ChunkInfo& c = chunks_[chunk_id]; | 
|  310   return (c.address() != NULL) && (c.size() != 0) && (c.owner() != NULL); |  318   return (c.address() != NULL) && (c.size() != 0) && (c.owner() != NULL); | 
|  311 } |  319 } | 
|  312  |  320  | 
|  313  |  321  | 
|  314 bool MemoryAllocator::IsValidChunkId(int chunk_id) { |  322 bool MemoryAllocator::IsValidChunkId(int chunk_id) { | 
|  315   return (0 <= chunk_id) && (chunk_id < max_nof_chunks_); |  323   return (0 <= chunk_id) && (chunk_id < max_nof_chunks_); | 
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  484  |  492  | 
|  485 bool FreeListNode::IsFreeListNode(HeapObject* object) { |  493 bool FreeListNode::IsFreeListNode(HeapObject* object) { | 
|  486   return object->map() == Heap::raw_unchecked_byte_array_map() |  494   return object->map() == Heap::raw_unchecked_byte_array_map() | 
|  487       || object->map() == Heap::raw_unchecked_one_pointer_filler_map() |  495       || object->map() == Heap::raw_unchecked_one_pointer_filler_map() | 
|  488       || object->map() == Heap::raw_unchecked_two_pointer_filler_map(); |  496       || object->map() == Heap::raw_unchecked_two_pointer_filler_map(); | 
|  489 } |  497 } | 
|  490  |  498  | 
|  491 } }  // namespace v8::internal |  499 } }  // namespace v8::internal | 
|  492  |  500  | 
|  493 #endif  // V8_SPACES_INL_H_ |  501 #endif  // V8_SPACES_INL_H_ | 
| OLD | NEW |