Revision: 9624 Author: [email protected] Date: Fri Oct 14 02:25:10 2011 Log: 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 http://code.google.com/p/v8/source/detail?r=9624 Modified: /branches/bleeding_edge/src/spaces.h ======================================= --- /branches/bleeding_edge/src/spaces.h Thu Oct 13 04:50:00 2011 +++ /branches/bleeding_edge/src/spaces.h Fri Oct 14 02:25:10 2011 @@ -2096,10 +2096,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
