Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: src/heap.cc

Issue 10542104: Merged r11740 into 3.8 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.8
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 namespace internal { 61 namespace internal {
62 62
63 63
64 static Mutex* gc_initializer_mutex = OS::CreateMutex(); 64 static Mutex* gc_initializer_mutex = OS::CreateMutex();
65 65
66 66
67 Heap::Heap() 67 Heap::Heap()
68 : isolate_(NULL), 68 : isolate_(NULL),
69 // semispace_size_ should be a power of 2 and old_generation_size_ should be 69 // semispace_size_ should be a power of 2 and old_generation_size_ should be
70 // a multiple of Page::kPageSize. 70 // a multiple of Page::kPageSize.
71 #if defined(ANDROID) 71 #if defined(V8_TARGET_ARCH_X64)
72 #define LUMP_OF_MEMORY (128 * KB)
73 code_range_size_(0),
74 #elif defined(V8_TARGET_ARCH_X64)
75 #define LUMP_OF_MEMORY (2 * MB) 72 #define LUMP_OF_MEMORY (2 * MB)
76 code_range_size_(512*MB), 73 code_range_size_(512*MB),
77 #else 74 #else
78 #define LUMP_OF_MEMORY MB 75 #define LUMP_OF_MEMORY MB
79 code_range_size_(0), 76 code_range_size_(0),
80 #endif 77 #endif
78 #if defined(ANDROID)
79 reserved_semispace_size_(4 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
80 max_semispace_size_(4 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
81 initial_semispace_size_(Page::kPageSize),
82 max_old_generation_size_(192*MB),
83 max_executable_size_(max_old_generation_size_),
84 #else
81 reserved_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)), 85 reserved_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
82 max_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)), 86 max_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
83 initial_semispace_size_(Page::kPageSize), 87 initial_semispace_size_(Page::kPageSize),
84 max_old_generation_size_(700ul * LUMP_OF_MEMORY), 88 max_old_generation_size_(700ul * LUMP_OF_MEMORY),
85 max_executable_size_(256l * LUMP_OF_MEMORY), 89 max_executable_size_(256l * LUMP_OF_MEMORY),
90 #endif
86 91
87 // Variables set based on semispace_size_ and old_generation_size_ in 92 // Variables set based on semispace_size_ and old_generation_size_ in
88 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_) 93 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_)
89 // Will be 4 * reserved_semispace_size_ to ensure that young 94 // Will be 4 * reserved_semispace_size_ to ensure that young
90 // generation can be aligned to its size. 95 // generation can be aligned to its size.
91 survived_since_last_expansion_(0), 96 survived_since_last_expansion_(0),
92 sweep_generation_(0), 97 sweep_generation_(0),
93 always_allocate_scope_depth_(0), 98 always_allocate_scope_depth_(0),
94 linear_allocation_scope_depth_(0), 99 linear_allocation_scope_depth_(0),
95 contexts_disposed_(0), 100 contexts_disposed_(0),
(...skipping 6638 matching lines...) Expand 10 before | Expand all | Expand 10 after
6734 isolate_->heap()->store_buffer()->Compact(); 6739 isolate_->heap()->store_buffer()->Compact();
6735 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 6740 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
6736 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6741 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6737 next = chunk->next_chunk(); 6742 next = chunk->next_chunk();
6738 isolate_->memory_allocator()->Free(chunk); 6743 isolate_->memory_allocator()->Free(chunk);
6739 } 6744 }
6740 chunks_queued_for_free_ = NULL; 6745 chunks_queued_for_free_ = NULL;
6741 } 6746 }
6742 6747
6743 } } // namespace v8::internal 6748 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698