Revision: 22007
Author: [email protected]
Date: Wed Jun 25 10:53:00 2014 UTC
Log: Wait for sweeper threads when expansion of old generation fails.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/351013002
http://code.google.com/p/v8/source/detail?r=22007
Modified:
/branches/bleeding_edge/src/spaces.cc
=======================================
--- /branches/bleeding_edge/src/spaces.cc Tue Jun 17 08:20:12 2014 UTC
+++ /branches/bleeding_edge/src/spaces.cc Wed Jun 25 10:53:00 2014 UTC
@@ -2595,6 +2595,16 @@
// 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;
}
@@ -2603,16 +2613,6 @@
ASSERT(CountTotalPages() > 1 || size_in_bytes <=
free_list_.available());
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.