Commit 2a4245e0 authored by ricow@chromium.org's avatar ricow@chromium.org

Fix available new space memory statistics reporting.

We currently report how much memory is available without changing page, i.e., the actual amount of available memory is not correctly stated for new space when doing --trace-gc.
Review URL: http://codereview.chromium.org/8275026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1959359a
......@@ -2096,10 +2096,9 @@ class NewSpace : public Space {
return Capacity();
}
// Return the available bytes without growing or switching page in the
// active semispace.
// Return the available bytes without growing.
intptr_t Available() {
return allocation_info_.limit - allocation_info_.top;
return Capacity() - Size();
}
// Return the maximum capacity of a semispace.
......
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