OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 5432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5443 if (!map_space_->Setup()) return false; | 5443 if (!map_space_->Setup()) return false; |
5444 | 5444 |
5445 // Initialize global property cell space. | 5445 // Initialize global property cell space. |
5446 cell_space_ = new CellSpace(this, max_old_generation_size_, CELL_SPACE); | 5446 cell_space_ = new CellSpace(this, max_old_generation_size_, CELL_SPACE); |
5447 if (cell_space_ == NULL) return false; | 5447 if (cell_space_ == NULL) return false; |
5448 if (!cell_space_->Setup()) return false; | 5448 if (!cell_space_->Setup()) return false; |
5449 | 5449 |
5450 // The large object code space may contain code or data. We set the memory | 5450 // The large object code space may contain code or data. We set the memory |
5451 // to be non-executable here for safety, but this means we need to enable it | 5451 // to be non-executable here for safety, but this means we need to enable it |
5452 // explicitly when allocating large code objects. | 5452 // explicitly when allocating large code objects. |
5453 lo_space_ = new LargeObjectSpace(this, LO_SPACE); | 5453 lo_space_ = new LargeObjectSpace(this, max_old_generation_size_, LO_SPACE); |
5454 if (lo_space_ == NULL) return false; | 5454 if (lo_space_ == NULL) return false; |
5455 if (!lo_space_->Setup()) return false; | 5455 if (!lo_space_->Setup()) return false; |
5456 if (create_heap_objects) { | 5456 if (create_heap_objects) { |
5457 // Create initial maps. | 5457 // Create initial maps. |
5458 if (!CreateInitialMaps()) return false; | 5458 if (!CreateInitialMaps()) return false; |
5459 if (!CreateApiObjects()) return false; | 5459 if (!CreateApiObjects()) return false; |
5460 | 5460 |
5461 // Create initial objects | 5461 // Create initial objects |
5462 if (!CreateInitialObjects()) return false; | 5462 if (!CreateInitialObjects()) return false; |
5463 | 5463 |
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6406 isolate_->heap()->store_buffer()->Compact(); | 6406 isolate_->heap()->store_buffer()->Compact(); |
6407 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); | 6407 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); |
6408 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { | 6408 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { |
6409 next = chunk->next_chunk(); | 6409 next = chunk->next_chunk(); |
6410 isolate_->memory_allocator()->Free(chunk); | 6410 isolate_->memory_allocator()->Free(chunk); |
6411 } | 6411 } |
6412 chunks_queued_for_free_ = NULL; | 6412 chunks_queued_for_free_ = NULL; |
6413 } | 6413 } |
6414 | 6414 |
6415 } } // namespace v8::internal | 6415 } } // namespace v8::internal |
OLD | NEW |