Reviewers: ulan,
Description:
Wait for sweeper threads when expansion of old generation fails.
BUG=
Please review this at https://codereview.chromium.org/351013002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+10, -10 lines):
M src/spaces.cc
Index: src/spaces.cc
diff --git a/src/spaces.cc b/src/spaces.cc
index
22233d9b3c2d011aa1ff8d59740cd97228689dc1..72a0222ba454d6c77d7bd8c714095bcee72100c8
100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -2595,6 +2595,16 @@ HeapObject* PagedSpace::SlowAllocateRaw(int
size_in_bytes) {
// collection.
if (!heap()->always_allocate() &&
heap()->OldGenerationAllocationLimitReached()) {
+ // If sweeper threads are active, wait for them at that point.
+ if (collector->IsConcurrentSweepingInProgress()) {
+ collector->WaitUntilSweepingCompleted();
+
+ // After waiting for the sweeper threads, there may be new free-list
+ // entries.
+ HeapObject* object = free_list_.Allocate(size_in_bytes);
+ if (object != NULL) return object;
+ }
+
return NULL;
}
@@ -2604,16 +2614,6 @@ HeapObject* PagedSpace::SlowAllocateRaw(int
size_in_bytes) {
return free_list_.Allocate(size_in_bytes);
}
- // If sweeper threads are active, wait for them at that point.
- if (collector->IsConcurrentSweepingInProgress()) {
- collector->WaitUntilSweepingCompleted();
-
- // After waiting for the sweeper threads, there may be new free-list
- // entries.
- HeapObject* object = free_list_.Allocate(size_in_bytes);
- if (object != NULL) return object;
- }
-
// Finally, fail.
return NULL;
}
--
--
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.