Author: [email protected]
Date: Tue Jul 14 15:38:06 2009
New Revision: 2460
Modified:
branches/bleeding_edge/src/compilation-cache.cc
branches/bleeding_edge/src/heap.cc
branches/bleeding_edge/src/spaces.cc
branches/bleeding_edge/src/spaces.h
Log:
Adjust kPagesPerChunk to 16 instead of 64 on Android.
Renamed some macros to ANDROID.
Review URL: http://codereview.chromium.org/155538
Modified: branches/bleeding_edge/src/compilation-cache.cc
==============================================================================
--- branches/bleeding_edge/src/compilation-cache.cc (original)
+++ branches/bleeding_edge/src/compilation-cache.cc Tue Jul 14 15:38:06 2009
@@ -37,7 +37,7 @@
static const int kSubCacheCount = 4;
// The number of generations for each sub cache.
-#if V8_TARGET_ARCH_ARM
+#if defined(ANDROID)
static const int kScriptGenerations = 1;
static const int kEvalGlobalGenerations = 1;
static const int kEvalContextualGenerations = 1;
Modified: branches/bleeding_edge/src/heap.cc
==============================================================================
--- branches/bleeding_edge/src/heap.cc (original)
+++ branches/bleeding_edge/src/heap.cc Tue Jul 14 15:38:06 2009
@@ -69,7 +69,7 @@
// semispace_size_ should be a power of 2 and old_generation_size_ should
be
// a multiple of Page::kPageSize.
-#if V8_TARGET_ARCH_ARM
+#if defined(ANDROID)
int Heap::semispace_size_ = 512*KB;
int Heap::old_generation_size_ = 128*MB;
int Heap::initial_semispace_size_ = 128*KB;
@@ -223,7 +223,7 @@
PrintF("Map space, used: %8d, available: %8d\n",
map_space_->Size(), map_space_->Available());
PrintF("Large object space, used: %8d, avaialble: %8d\n",
- map_space_->Size(), map_space_->Available());
+ lo_space_->Size(), lo_space_->Available());
}
#endif
Modified: branches/bleeding_edge/src/spaces.cc
==============================================================================
--- branches/bleeding_edge/src/spaces.cc (original)
+++ branches/bleeding_edge/src/spaces.cc Tue Jul 14 15:38:06 2009
@@ -725,11 +725,15 @@
Page* current_page = top_page->next_page();
// Loop over the pages to the end of the space.
while (current_page->is_valid()) {
+#if defined(ANDROID)
+ // Free all chunks if possible
+#else
// Advance last_page_to_keep every other step to end up at the
midpoint.
if ((free_pages & 0x1) == 1) {
pages_to_keep++;
last_page_to_keep = last_page_to_keep->next_page();
}
+#endif
free_pages++;
current_page = current_page->next_page();
}
Modified: branches/bleeding_edge/src/spaces.h
==============================================================================
--- branches/bleeding_edge/src/spaces.h (original)
+++ branches/bleeding_edge/src/spaces.h Tue Jul 14 15:38:06 2009
@@ -437,7 +437,11 @@
static const int kMaxNofChunks = 1 << Page::kPageSizeBits;
// If a chunk has at least 32 pages, the maximum heap size is about
// 8 * 1024 * 32 * 8K = 2G bytes.
+#if defined(ANDROID)
+ static const int kPagesPerChunk = 16;
+#else
static const int kPagesPerChunk = 64;
+#endif
static const int kChunkSize = kPagesPerChunk * Page::kPageSize;
private:
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---