Reviewers: Erik Corry,

http://codereview.chromium.org/7993003/diff/1/src/spaces-inl.h
File src/spaces-inl.h (right):

http://codereview.chromium.org/7993003/diff/1/src/spaces-inl.h#newcode255
src/spaces-inl.h:255: Address current_top = allocation_info_.top;
This is only used below, no need to pass allocation_info_ in a pointer

Description:
GC Cleanup + Set max old generation size to 700MB on ia32 and max executable
size to 128 MB (on ia32)

Please review this at http://codereview.chromium.org/7993003/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/heap.cc
  M     src/spaces-inl.h
  M     src/spaces.h
  M     src/spaces.cc


Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 9370)
+++ src/heap.cc (working copy)
@@ -81,8 +81,8 @@
       reserved_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
       max_semispace_size_(8 * Max(LUMP_OF_MEMORY, Page::kPageSize)),
       initial_semispace_size_(Max(LUMP_OF_MEMORY, Page::kPageSize)),
-      max_old_generation_size_(1400ul * LUMP_OF_MEMORY),
-      max_executable_size_(256l * LUMP_OF_MEMORY),
+      max_old_generation_size_(700ul * LUMP_OF_MEMORY),
+      max_executable_size_(128l * LUMP_OF_MEMORY),

 // Variables set based on semispace_size_ and old_generation_size_ in
// ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_)
Index: src/spaces-inl.h
===================================================================
--- src/spaces-inl.h    (revision 9370)
+++ src/spaces-inl.h    (working copy)
@@ -251,14 +251,13 @@
 // not contain slow case logic (eg, move to the next page or try free list
// allocation) so it can be used by all the allocation functions and for all
 // the paged spaces.
-HeapObject* PagedSpace::AllocateLinearly(AllocationInfo* alloc_info,
-                                         int size_in_bytes) {
-  Address current_top = alloc_info->top;
+HeapObject* PagedSpace::AllocateLinearly(int size_in_bytes) {
+  Address current_top = allocation_info_.top;
   Address new_top = current_top + size_in_bytes;
-  if (new_top > alloc_info->limit) return NULL;
+  if (new_top > allocation_info_.limit) return NULL;

-  alloc_info->top = new_top;
-  ASSERT(alloc_info->VerifyPagedAllocation());
+  allocation_info_.top = new_top;
+  ASSERT(allocation_info_.VerifyPagedAllocation());
   ASSERT(current_top != NULL);
   return HeapObject::FromAddress(current_top);
 }
@@ -268,7 +267,7 @@
 MaybeObject* PagedSpace::AllocateRaw(int size_in_bytes) {
   ASSERT(HasBeenSetup());
   ASSERT_OBJECT_SIZE(size_in_bytes);
-  HeapObject* object = AllocateLinearly(&allocation_info_, size_in_bytes);
+  HeapObject* object = AllocateLinearly(size_in_bytes);
   if (object != NULL) {
     if (identity() == CODE_SPACE) {
       SkipList::Update(object->address(), size_in_bytes);
Index: src/spaces.cc
===================================================================
--- src/spaces.cc       (revision 9370)
+++ src/spaces.cc       (working copy)
@@ -766,15 +766,6 @@
 }


-bool PagedSpace::EnsureCapacity(int capacity) {
-  while (Capacity() < capacity) {
- // Expand the space until it has the required capacity or expansion fails.
-    if (!Expand()) return false;
-  }
-  return true;
-}
-
-
 #ifdef DEBUG
 void PagedSpace::Print() { }
 #endif
Index: src/spaces.h
===================================================================
--- src/spaces.h        (revision 9370)
+++ src/spaces.h        (working copy)
@@ -1505,9 +1505,6 @@
   // Releases half of unused pages.
   void Shrink();

- // Ensures that the capacity is at least 'capacity'. Returns false on failure.
-  bool EnsureCapacity(int capacity);
-
   // The dummy page that anchors the linked list of pages.
   Page* anchor() { return &anchor_; }

@@ -1625,8 +1622,7 @@

// Generic fast case allocation function that tries linear allocation at the
   // address denoted by top in allocation_info_.
-  inline HeapObject* AllocateLinearly(AllocationInfo* alloc_info,
-                                      int size_in_bytes);
+  inline HeapObject* AllocateLinearly(int size_in_bytes);

   // Slow path of AllocateRaw.  This function is space-dependent.
   MUST_USE_RESULT virtual HeapObject* SlowAllocateRaw(int size_in_bytes);


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to