Reviewers: Hannes Payer, Erik Corry Chromium.org,
Message:
PTAL
Description:
Respect old space allocation limit in PagedSpace::AllocateRaw.
BUG=v8:3976
LOG=NO
Please review this at https://codereview.chromium.org/1025643002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+5, -1 lines):
M src/heap/heap.cc
M src/heap/spaces.cc
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index
054ebced2a899ff2d20941a4d4b76638de122f8a..fe02f3167f43c0b105a01b2b254570ea6ba7e78e
100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1867,6 +1867,10 @@ class NewSpaceScavenger : public
StaticNewSpaceVisitor<NewSpaceScavenger> {
Address Heap::DoScavenge(ObjectVisitor* scavenge_visitor,
Address new_space_front) {
+ // There are soft limits in the allocation code, designed trigger a mark
+ // sweep collection by failing allocations. There is no sense in trying
to
+ // trigger one in during scavenge.
+ AlwaysAllocateScope scope(isolate());
do {
SemiSpace::AssertValidRange(new_space_front, new_space_.top());
// The addresses new_space_front and new_space_.top() define a
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index
f3c2eb0abb0134f9f96da51d2d52960c088fcd69..827f3abb607a9ec7e8a82d58de548bd3e83c37e8
100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -2618,7 +2618,7 @@ HeapObject* PagedSpace::SlowAllocateRaw(int
size_in_bytes) {
// If sweeper threads are active, wait for them at that point and steal
// elements form their free-lists.
HeapObject* object =
WaitForSweeperThreadsAndRetryAllocation(size_in_bytes);
- if (object != NULL) return object;
+ return object;
}
// Try to expand the space and allocate in the new next page.
--
--
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.