Does calling ReserveSpace really ensure that you can allocate that many bytes?
What about unusable holes at the end of pages?  Also, size of large objects
depends on the granularity of the OS allocation routines, so the slack there
needs depend on that?


http://codereview.chromium.org/545026/diff/1/10
File src/heap.h (right):

http://codereview.chromium.org/545026/diff/1/10#newcode1060
src/heap.h:1060: HeapObject* target,
Missing space on this line and the next.

http://codereview.chromium.org/545026/diff/1/7
File src/spaces.cc (right):

http://codereview.chromium.org/545026/diff/1/7#newcode1852
src/spaces.cc:1852: bytes_left_to_reserve -= Page::kPageSize;
Do we need some slack here?  Allocating just enough pages for |bytes|
bytes does not ensure that you can actually allocate them if there is a
hole that you cannot use at the end of one of the pages.

http://codereview.chromium.org/545026/diff/1/7#newcode1866
src/spaces.cc:1866: // We add a slack-factor of 2 in order to have space
for the remembered
Is a factor of 2 enough?  I would guess that this really needs to scale
with the allocation granularity of the operating system.  I believe that
we allocate a minimum of 64k for a large object on Windows even though
the object might only be slightly larger than 8k.

http://codereview.chromium.org/545026/diff/1/4
File src/spaces.h (right):

http://codereview.chromium.org/545026/diff/1/4#newcode311
src/spaces.h:311: // snapshots.  It returns true of space was reserved
or false if a GC is
of space -> if space

http://codereview.chromium.org/545026
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to