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

Side by Side Diff: src/spaces.h

Issue 7870003: Guard against rare case of allocation failure during evacuation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 3 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 | « src/mark-compact.cc ('k') | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1485 static_cast<int>(sizes[3]), 1485 static_cast<int>(sizes[3]),
1486 static_cast<double>(sizes[3] * 100) / Page::kObjectAreaSize, 1486 static_cast<double>(sizes[3] * 100) / Page::kObjectAreaSize,
1487 (ratio > ratio_threshold) ? "[fragmented]" : ""); 1487 (ratio > ratio_threshold) ? "[fragmented]" : "");
1488 } 1488 }
1489 1489
1490 return (ratio > ratio_threshold) || FLAG_always_compact; 1490 return (ratio > ratio_threshold) || FLAG_always_compact;
1491 } 1491 }
1492 1492
1493 void EvictEvacuationCandidatesFromFreeLists(); 1493 void EvictEvacuationCandidatesFromFreeLists();
1494 1494
1495 bool CanExpand();
1496
1495 protected: 1497 protected:
1496 // Maximum capacity of this space. 1498 // Maximum capacity of this space.
1497 intptr_t max_capacity_; 1499 intptr_t max_capacity_;
1498 1500
1499 // Accounting information for this space. 1501 // Accounting information for this space.
1500 AllocationStats accounting_stats_; 1502 AllocationStats accounting_stats_;
1501 1503
1502 // The dummy page that anchors the double linked list of pages. 1504 // The dummy page that anchors the double linked list of pages.
1503 Page anchor_; 1505 Page anchor_;
1504 1506
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
2515 } 2517 }
2516 // Must be small, since an iteration is used for lookup. 2518 // Must be small, since an iteration is used for lookup.
2517 static const int kMaxComments = 64; 2519 static const int kMaxComments = 64;
2518 }; 2520 };
2519 #endif 2521 #endif
2520 2522
2521 2523
2522 } } // namespace v8::internal 2524 } } // namespace v8::internal
2523 2525
2524 #endif // V8_SPACES_H_ 2526 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698