Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: src/spaces.h

Issue 380653003: Allow main thread to contribute to the sweeping phase. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_SPACES_H_ 5 #ifndef V8_SPACES_H_
6 #define V8_SPACES_H_ 6 #define V8_SPACES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/base/platform/mutex.h" 10 #include "src/base/platform/mutex.h"
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 2007
2008 // Expands the space by allocating a fixed number of pages. Returns false if 2008 // Expands the space by allocating a fixed number of pages. Returns false if
2009 // it cannot allocate requested number of pages from OS, or if the hard heap 2009 // it cannot allocate requested number of pages from OS, or if the hard heap
2010 // size limit has been hit. 2010 // size limit has been hit.
2011 bool Expand(); 2011 bool Expand();
2012 2012
2013 // Generic fast case allocation function that tries linear allocation at the 2013 // Generic fast case allocation function that tries linear allocation at the
2014 // address denoted by top in allocation_info_. 2014 // address denoted by top in allocation_info_.
2015 inline HeapObject* AllocateLinearly(int size_in_bytes); 2015 inline HeapObject* AllocateLinearly(int size_in_bytes);
2016 2016
2017 MUST_USE_RESULT HeapObject* 2017 // If sweeping is still in progress try to sweep unswept pages. If that is
2018 WaitForSweeperThreadsAndRetryAllocation(int size_in_bytes); 2018 // not successful, wait for the sweeper threads and re-try free-list
2019 // allocation.
2020 MUST_USE_RESULT HeapObject* EnsureSweepingProgress(int size_in_bytes);
2019 2021
2020 // Slow path of AllocateRaw. This function is space-dependent. 2022 // Slow path of AllocateRaw. This function is space-dependent.
2021 MUST_USE_RESULT HeapObject* SlowAllocateRaw(int size_in_bytes); 2023 MUST_USE_RESULT HeapObject* SlowAllocateRaw(int size_in_bytes);
2022 2024
2023 friend class PageIterator; 2025 friend class PageIterator;
2024 friend class MarkCompactCollector; 2026 friend class MarkCompactCollector;
2025 }; 2027 };
2026 2028
2027 2029
2028 class NumberAndSizeInfo BASE_EMBEDDED { 2030 class NumberAndSizeInfo BASE_EMBEDDED {
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
3014 } 3016 }
3015 // Must be small, since an iteration is used for lookup. 3017 // Must be small, since an iteration is used for lookup.
3016 static const int kMaxComments = 64; 3018 static const int kMaxComments = 64;
3017 }; 3019 };
3018 #endif 3020 #endif
3019 3021
3020 3022
3021 } } // namespace v8::internal 3023 } } // namespace v8::internal
3022 3024
3023 #endif // V8_SPACES_H_ 3025 #endif // V8_SPACES_H_
OLDNEW
« src/mark-compact.cc ('K') | « src/mark-compact.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698