Commit c3383698 authored by jochen@chromium.org's avatar jochen@chromium.org

Rename MarkCompactCollector::StealMemoryFromSweeperThreads to RefillFreeLists

The swept memory is now collected on the foreground thread, so it's not
stealing the memory from the threads anymore

BUG=v8:3104
R=hpayer@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/143463005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2d9a4eb3
......@@ -583,15 +583,14 @@ void MarkCompactCollector::WaitUntilSweepingCompleted() {
isolate()->sweeper_threads()[i]->WaitForSweeperThread();
}
sweeping_pending_ = false;
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_DATA_SPACE));
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_POINTER_SPACE));
RefillFreeLists(heap()->paged_space(OLD_DATA_SPACE));
RefillFreeLists(heap()->paged_space(OLD_POINTER_SPACE));
heap()->paged_space(OLD_DATA_SPACE)->ResetUnsweptFreeBytes();
heap()->paged_space(OLD_POINTER_SPACE)->ResetUnsweptFreeBytes();
}
intptr_t MarkCompactCollector::
StealMemoryFromSweeperThreads(PagedSpace* space) {
intptr_t MarkCompactCollector::RefillFreeLists(PagedSpace* space) {
FreeList* free_list = space == heap()->old_pointer_space()
? free_list_old_pointer_space_.get()
: free_list_old_data_space_.get();
......
......@@ -721,7 +721,7 @@ class MarkCompactCollector {
void WaitUntilSweepingCompleted();
intptr_t StealMemoryFromSweeperThreads(PagedSpace* space);
intptr_t RefillFreeLists(PagedSpace* space);
bool AreSweeperThreadsActivated();
......
......@@ -2612,7 +2612,7 @@ bool PagedSpace::EnsureSweeperProgress(intptr_t size_in_bytes) {
MarkCompactCollector* collector = heap()->mark_compact_collector();
if (collector->AreSweeperThreadsActivated()) {
if (collector->IsConcurrentSweepingInProgress()) {
if (collector->StealMemoryFromSweeperThreads(this) < size_in_bytes) {
if (collector->RefillFreeLists(this) < size_in_bytes) {
if (!collector->sequential_sweeping()) {
collector->WaitUntilSweepingCompleted();
return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment