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

Unified Diff: runtime/vm/heap.h

Issue 14190014: - Disassociate old page size from new allocatable size. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/gc_sweeper.cc ('k') | runtime/vm/pages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.h
===================================================================
--- runtime/vm/heap.h (revision 22017)
+++ runtime/vm/heap.h (working copy)
@@ -58,7 +58,7 @@
switch (space) {
case kNew:
// Do not attempt to allocate very large objects in new space.
- if (!PageSpace::IsPageAllocatableSize(size)) {
+ if (!IsNewAllocatableSize(size)) {
return AllocateOld(size, HeapPage::kData);
}
return AllocateNew(size);
@@ -192,6 +192,10 @@
bool gc_in_progress() const { return gc_in_progress_; }
+ static bool IsNewAllocatableSize(intptr_t size) {
Vyacheslav Egorov (Google) 2013/04/25 22:11:28 the name is a bit confusing. maybe IsAllocatableIn
Ivan Posva 2013/04/26 06:14:00 I was not happy with the name either. I settled on
+ return size <= kNewAllocatableSize;
+ }
+
private:
class GCStats : public ValueObject {
public:
@@ -224,6 +228,8 @@
DISALLOW_COPY_AND_ASSIGN(GCStats);
};
+ static const intptr_t kNewAllocatableSize = 256 * KB;
+
Heap();
uword AllocateNew(intptr_t size);
« no previous file with comments | « runtime/vm/gc_sweeper.cc ('k') | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698