Revision: 13814
Author:   [email protected]
Date:     Mon Mar  4 07:47:59 2013
Log:      Fix assert in PagedSpace::SizeOfObject for concurrent sweeping.

BUG=

Review URL: https://codereview.chromium.org/12378071
http://code.google.com/p/v8/source/detail?r=13814

Modified:
 /branches/bleeding_edge/src/spaces.cc
 /branches/bleeding_edge/src/spaces.h

=======================================
--- /branches/bleeding_edge/src/spaces.cc       Mon Mar  4 06:56:20 2013
+++ /branches/bleeding_edge/src/spaces.cc       Mon Mar  4 07:47:59 2013
@@ -2474,6 +2474,12 @@
   SetTop(new_area->address(), new_area->address() + size_in_bytes);
   return true;
 }
+
+
+intptr_t PagedSpace::SizeOfObjects() {
+  ASSERT(!heap()->IsSweepingComplete() || (unswept_free_bytes_ == 0));
+  return Size() - unswept_free_bytes_ - (limit() - top());
+}


 // After we have booted, we have created a map which represents free space
=======================================
--- /branches/bleeding_edge/src/spaces.h        Fri Mar  1 04:46:20 2013
+++ /branches/bleeding_edge/src/spaces.h        Mon Mar  4 07:47:59 2013
@@ -1648,11 +1648,7 @@

// As size, but the bytes in lazily swept pages are estimated and the bytes
   // in the current linear allocation area are not included.
-  virtual intptr_t SizeOfObjects() {
-    // TODO(hpayer): broken when concurrent sweeping turned on
-    ASSERT(!IsLazySweepingComplete() || (unswept_free_bytes_ == 0));
-    return Size() - unswept_free_bytes_ - (limit() - top());
-  }
+  virtual intptr_t SizeOfObjects();

// Wasted bytes in this space. These are just the bytes that were thrown away
   // due to being too small to use for allocation.  They do not include the

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to