Thanks for the patch. I understand the motivation of the change and agree that mark-sweep collections should maintain double alignment. Unfortunately I am not yet entirely sure about how to implement this in a clean way and prevent code duplication at the different allocation sites in the GC. I will think about this
some more and try to come up with a fix for the missing alignment.


https://codereview.chromium.org/35103002/diff/20001/src/mark-compact.cc
File src/mark-compact.cc (right):

https://codereview.chromium.org/35103002/diff/20001/src/mark-compact.cc#newcode2021
src/mark-compact.cc:2021: allocation_size += kPointerSize;
Hmm, could this end up using more space in the to-space than was used in
the from-space? Imagine every object in the from-space survives and
promotion fails. Every object was allocated with the inline allocation
sequence that doesn't over-allocate to align. With this alignment
strategy every object will consume one additional word in to-space.

I realize that this is a highly constructed scenario, and that we
already have that problem with the existing EvacuateObject
implementation. But it leads me to believe that a better way of
implementing the alignment within the GC would be to make sure the
top-pointer is aligned before we allocate.

https://codereview.chromium.org/35103002/diff/20001/src/mark-compact.cc#newcode2948
src/mark-compact.cc:2948: allocation_size += kPointerSize;
This might exceed Page::kMaxNonCodeHeapObjectSize.

https://codereview.chromium.org/35103002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to