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

Unified Diff: src/spaces.cc

Issue 306001: Heap profiler: skip byte arrays that represent free list blocks when counting allocated objects. (Closed)
Patch Set: added the third type to check Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/spaces.h ('k') | src/spaces-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.cc
diff --git a/src/spaces.cc b/src/spaces.cc
index 43abaa499931de9dff2a948a1caf901663620779..7014172655b75414b2cf63b5e0c50d0759336726 100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -1540,8 +1540,7 @@ void FreeListNode::set_size(int size_in_bytes) {
Address FreeListNode::next() {
- ASSERT(map() == Heap::raw_unchecked_byte_array_map() ||
- map() == Heap::raw_unchecked_two_pointer_filler_map());
+ ASSERT(IsFreeListNode(this));
if (map() == Heap::raw_unchecked_byte_array_map()) {
ASSERT(Size() >= kNextOffset + kPointerSize);
return Memory::Address_at(address() + kNextOffset);
@@ -1552,8 +1551,7 @@ Address FreeListNode::next() {
void FreeListNode::set_next(Address next) {
- ASSERT(map() == Heap::raw_unchecked_byte_array_map() ||
- map() == Heap::raw_unchecked_two_pointer_filler_map());
+ ASSERT(IsFreeListNode(this));
if (map() == Heap::raw_unchecked_byte_array_map()) {
ASSERT(Size() >= kNextOffset + kPointerSize);
Memory::Address_at(address() + kNextOffset) = next;
« no previous file with comments | « src/spaces.h ('k') | src/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698