Done.

https://codereview.chromium.org/1265443003/diff/1/src/heap/spaces-inl.h
File src/heap/spaces-inl.h (right):

https://codereview.chromium.org/1265443003/diff/1/src/heap/spaces-inl.h#newcode348
src/heap/spaces-inl.h:348: int filler_size =
Heap::GetFillToAlign(allocation_info_.top(), alignment);
On 2015/07/30 10:38:25, Hannes Payer wrote:
Keep top in a temporary variable.

Done.

https://codereview.chromium.org/1265443003/diff/1/src/heap/spaces-inl.h#newcode354
src/heap/spaces-inl.h:354: if (EnsureAllocation(size_in_bytes,
alignment) == false) {
On 2015/07/30 10:38:25, Hannes Payer wrote:
Instead of "== false" use "!".

Done.

https://codereview.chromium.org/1265443003/diff/1/src/heap/spaces-inl.h#newcode357
src/heap/spaces-inl.h:357:
On 2015/07/30 10:38:25, Hannes Payer wrote:
if top changed, read out top again and recalculate
aligned_size_in_bytes.

Done.

https://codereview.chromium.org/1265443003/diff/1/src/heap/spaces-inl.h#newcode359
src/heap/spaces-inl.h:359: aligned_size_in_bytes) {
On 2015/07/30 10:38:25, Hannes Payer wrote:
This check should not be needed.

Done.

https://codereview.chromium.org/1265443003/diff/1/src/heap/spaces-inl.h#newcode365
src/heap/spaces-inl.h:365: HeapObject* obj =
HeapObject::FromAddress(allocation_info_.top());
On 2015/07/30 10:38:25, Hannes Payer wrote:
Use the temporary top variable here.

Done.

https://codereview.chromium.org/1265443003/diff/1/src/heap/spaces-inl.h#newcode379
src/heap/spaces-inl.h:379: AllocationResult
NewSpace::AllocateRawUnaligned(int size_in_bytes) {
On 2015/07/30 10:38:25, Hannes Payer wrote:
Comments from above apply also here.

Done.

https://codereview.chromium.org/1265443003/diff/1/src/heap/spaces.cc
File src/heap/spaces.cc (right):

https://codereview.chromium.org/1265443003/diff/1/src/heap/spaces.cc#newcode1474
src/heap/spaces.cc:1474: if (allocation_info_.limit() < high) {
On 2015/07/30 10:38:25, Hannes Payer wrote:
This method should in principle take care of two cases:
1) there is room in this page: top + size_in_bytes < high
2) there is no room in this page.

Case one right now does not guarantee that there is room. We just go
there
whenever limit is smaller than high, but a huge allocation would just
go over
high.

We should restructure the code to check if there is room: top +
size_in_bytes <
high. If there is room perform case 1) If there is no room add a fresh
page (if
possible) and do the special accounting. Then perform case 1).

This method should return true if it can guarantee that the bump
pointer
allocation will succeed.

Done.

https://codereview.chromium.org/1265443003/

--
--
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/d/optout.

Reply via email to