Reviewers: Erik Corry, Description: Fix availble 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. Please review this at http://codereview.chromium.org/8275026/ SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/spaces.h Index: src/spaces.h =================================================================== --- src/spaces.h (revision 9590) +++ src/spaces.h (working copy) @@ -2100,10 +2100,9 @@ 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. -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
