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

Side by Side Diff: src/spaces.h

Issue 356403002: Waiting for sweeper threads is last resort in SlowAllocateRaw. (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
« no previous file with comments | « no previous file | src/spaces.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/hashmap.h" 10 #include "src/hashmap.h"
(...skipping 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after
2000 2000
2001 // Expands the space by allocating a fixed number of pages. Returns false if 2001 // Expands the space by allocating a fixed number of pages. Returns false if
2002 // it cannot allocate requested number of pages from OS, or if the hard heap 2002 // it cannot allocate requested number of pages from OS, or if the hard heap
2003 // size limit has been hit. 2003 // size limit has been hit.
2004 bool Expand(); 2004 bool Expand();
2005 2005
2006 // Generic fast case allocation function that tries linear allocation at the 2006 // Generic fast case allocation function that tries linear allocation at the
2007 // address denoted by top in allocation_info_. 2007 // address denoted by top in allocation_info_.
2008 inline HeapObject* AllocateLinearly(int size_in_bytes); 2008 inline HeapObject* AllocateLinearly(int size_in_bytes);
2009 2009
2010 MUST_USE_RESULT HeapObject*
2011 WaitForSweeperThreadsAndRetryAllocation(int size_in_bytes);
2012
2010 // Slow path of AllocateRaw. This function is space-dependent. 2013 // Slow path of AllocateRaw. This function is space-dependent.
2011 MUST_USE_RESULT virtual HeapObject* SlowAllocateRaw(int size_in_bytes); 2014 MUST_USE_RESULT HeapObject* SlowAllocateRaw(int size_in_bytes);
2012 2015
2013 friend class PageIterator; 2016 friend class PageIterator;
2014 friend class MarkCompactCollector; 2017 friend class MarkCompactCollector;
2015 }; 2018 };
2016 2019
2017 2020
2018 class NumberAndSizeInfo BASE_EMBEDDED { 2021 class NumberAndSizeInfo BASE_EMBEDDED {
2019 public: 2022 public:
2020 NumberAndSizeInfo() : number_(0), bytes_(0) {} 2023 NumberAndSizeInfo() : number_(0), bytes_(0) {}
2021 2024
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
3004 } 3007 }
3005 // Must be small, since an iteration is used for lookup. 3008 // Must be small, since an iteration is used for lookup.
3006 static const int kMaxComments = 64; 3009 static const int kMaxComments = 64;
3007 }; 3010 };
3008 #endif 3011 #endif
3009 3012
3010 3013
3011 } } // namespace v8::internal 3014 } } // namespace v8::internal
3012 3015
3013 #endif // V8_SPACES_H_ 3016 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « no previous file | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698