Commit 16309540 authored by hpayer@chromium.org's avatar hpayer@chromium.org

Fix assert in PagedSpace::SizeOfObject for concurrent sweeping.

BUG=

Review URL: https://codereview.chromium.org/12378071

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c5de322c
......@@ -2476,6 +2476,12 @@ bool PagedSpace::ReserveSpace(int size_in_bytes) {
}
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
// on the heap. If there was already a free list then the elements on it
// were created with the wrong FreeSpaceMap (normally NULL), so we need to
......
......@@ -1648,11 +1648,7 @@ class PagedSpace : public Space {
// 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment