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

Side by Side Diff: src/heap.cc

Issue 10541053: Remove Android specifc LUMP_OF_MEMORY. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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 | no next file » | 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #endif 59 #endif
60 60
61 namespace v8 { 61 namespace v8 {
62 namespace internal { 62 namespace internal {
63 63
64 64
65 Heap::Heap() 65 Heap::Heap()
66 : isolate_(NULL), 66 : isolate_(NULL),
67 // semispace_size_ should be a power of 2 and old_generation_size_ should be 67 // semispace_size_ should be a power of 2 and old_generation_size_ should be
68 // a multiple of Page::kPageSize. 68 // a multiple of Page::kPageSize.
69 #if defined(ANDROID) 69 #if defined(V8_TARGET_ARCH_X64)
70 #define LUMP_OF_MEMORY (128 * KB)
71 code_range_size_(0),
72 #elif defined(V8_TARGET_ARCH_X64)
73 #define LUMP_OF_MEMORY (2 * MB) 70 #define LUMP_OF_MEMORY (2 * MB)
74 code_range_size_(512*MB), 71 code_range_size_(512*MB),
75 #else 72 #else
76 #define LUMP_OF_MEMORY MB 73 #define LUMP_OF_MEMORY MB
77 code_range_size_(0), 74 code_range_size_(0),
78 #endif 75 #endif
76 #if defined(ANDROID)
77 reserved_semispace_size_(4 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
78 max_semispace_size_(4 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
79 initial_semispace_size_(Page::kPageSize),
80 max_old_generation_size_(192*MB),
81 max_executable_size_(max_old_generation_size_),
82 #else
79 reserved_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)), 83 reserved_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
80 max_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)), 84 max_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
81 initial_semispace_size_(Page::kPageSize), 85 initial_semispace_size_(Page::kPageSize),
82 max_old_generation_size_(700ul * LUMP_OF_MEMORY), 86 max_old_generation_size_(700ul * LUMP_OF_MEMORY),
83 max_executable_size_(256l * LUMP_OF_MEMORY), 87 max_executable_size_(256l * LUMP_OF_MEMORY),
88 #endif
84 89
85 // Variables set based on semispace_size_ and old_generation_size_ in 90 // Variables set based on semispace_size_ and old_generation_size_ in
86 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_) 91 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_)
87 // Will be 4 * reserved_semispace_size_ to ensure that young 92 // Will be 4 * reserved_semispace_size_ to ensure that young
88 // generation can be aligned to its size. 93 // generation can be aligned to its size.
89 survived_since_last_expansion_(0), 94 survived_since_last_expansion_(0),
90 sweep_generation_(0), 95 sweep_generation_(0),
91 always_allocate_scope_depth_(0), 96 always_allocate_scope_depth_(0),
92 linear_allocation_scope_depth_(0), 97 linear_allocation_scope_depth_(0),
93 contexts_disposed_(0), 98 contexts_disposed_(0),
(...skipping 7051 matching lines...) Expand 10 before | Expand all | Expand 10 after
7145 } else { 7150 } else {
7146 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. 7151 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died.
7147 } 7152 }
7148 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = 7153 remembered_unmapped_pages_[remembered_unmapped_pages_index_] =
7149 reinterpret_cast<Address>(p); 7154 reinterpret_cast<Address>(p);
7150 remembered_unmapped_pages_index_++; 7155 remembered_unmapped_pages_index_++;
7151 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; 7156 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages;
7152 } 7157 }
7153 7158
7154 } } // namespace v8::internal 7159 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698