Updates:
Cc: erik.corry [email protected]
Comment #7 on issue 2191 by [email protected]: V8 reports heap
memory size bigger than process private memory
http://code.google.com/p/v8/issues/detail?id=2191
So I investigated this again and with the new test case I could reliably
reproduce the mentioned discrepancy.
It happens right after we grow the new-space from 16M to 32M. We do this by
committing previously reserved memory using mmap[1]. We only touch the
first few bytes of each 1MB block in this newly allocated region. It seems
the OS doesn't report the committed pages as "private memory" right away,
but only when we first touch all of them
When I enable zapping[2] (i.e. overwriting with garbage) of the whole
region, the reported "private memory" is much higher, makes bigger jumps
and doesn't show the above discrepancy. But V8 only zaps newly committed
memory in debug mode but not in release mode. And I don't think touching
all the memory we commit is the way to go here.
At the moment I don't have a concrete idea how to make those two numbers
comparable, they are coming from two different memory management systems. I
am CCing others, maybe someone else has suggestions.
[1]
http://code.google.com/p/v8/source/browse/branches/3.13/src/platform-linux.cc#673
[2]
http://code.google.com/p/v8/source/browse/branches/3.13/src/spaces.cc#624
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev