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

Side by Side Diff: src/heap.cc

Issue 10536069: Merged r11740 into 3.9 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.9
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 namespace v8 { 60 namespace v8 {
61 namespace internal { 61 namespace internal {
62 62
63 static LazyMutex gc_initializer_mutex = LAZY_MUTEX_INITIALIZER; 63 static LazyMutex gc_initializer_mutex = LAZY_MUTEX_INITIALIZER;
64 64
65 65
66 Heap::Heap() 66 Heap::Heap()
67 : isolate_(NULL), 67 : isolate_(NULL),
68 // semispace_size_ should be a power of 2 and old_generation_size_ should be 68 // semispace_size_ should be a power of 2 and old_generation_size_ should be
69 // a multiple of Page::kPageSize. 69 // a multiple of Page::kPageSize.
70 #if defined(ANDROID) 70 #if defined(V8_TARGET_ARCH_X64)
71 #define LUMP_OF_MEMORY (128 * KB)
72 code_range_size_(0),
73 #elif defined(V8_TARGET_ARCH_X64)
74 #define LUMP_OF_MEMORY (2 * MB) 71 #define LUMP_OF_MEMORY (2 * MB)
75 code_range_size_(512*MB), 72 code_range_size_(512*MB),
76 #else 73 #else
77 #define LUMP_OF_MEMORY MB 74 #define LUMP_OF_MEMORY MB
78 code_range_size_(0), 75 code_range_size_(0),
79 #endif 76 #endif
77 #if defined(ANDROID)
78 reserved_semispace_size_(4 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
79 max_semispace_size_(4 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
80 initial_semispace_size_(Page::kPageSize),
81 max_old_generation_size_(192*MB),
82 max_executable_size_(max_old_generation_size_),
83 #else
80 reserved_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)), 84 reserved_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
81 max_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)), 85 max_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
82 initial_semispace_size_(Page::kPageSize), 86 initial_semispace_size_(Page::kPageSize),
83 max_old_generation_size_(700ul * LUMP_OF_MEMORY), 87 max_old_generation_size_(700ul * LUMP_OF_MEMORY),
84 max_executable_size_(256l * LUMP_OF_MEMORY), 88 max_executable_size_(256l * LUMP_OF_MEMORY),
89 #endif
85 90
86 // Variables set based on semispace_size_ and old_generation_size_ in 91 // Variables set based on semispace_size_ and old_generation_size_ in
87 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_) 92 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_)
88 // Will be 4 * reserved_semispace_size_ to ensure that young 93 // Will be 4 * reserved_semispace_size_ to ensure that young
89 // generation can be aligned to its size. 94 // generation can be aligned to its size.
90 survived_since_last_expansion_(0), 95 survived_since_last_expansion_(0),
91 sweep_generation_(0), 96 sweep_generation_(0),
92 always_allocate_scope_depth_(0), 97 always_allocate_scope_depth_(0),
93 linear_allocation_scope_depth_(0), 98 linear_allocation_scope_depth_(0),
94 contexts_disposed_(0), 99 contexts_disposed_(0),
(...skipping 6885 matching lines...) Expand 10 before | Expand all | Expand 10 after
6980 } else { 6985 } else {
6981 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. 6986 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died.
6982 } 6987 }
6983 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = 6988 remembered_unmapped_pages_[remembered_unmapped_pages_index_] =
6984 reinterpret_cast<Address>(p); 6989 reinterpret_cast<Address>(p);
6985 remembered_unmapped_pages_index_++; 6990 remembered_unmapped_pages_index_++;
6986 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; 6991 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages;
6987 } 6992 }
6988 6993
6989 } } // namespace v8::internal 6994 } } // 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