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

Side by Side Diff: src/heap.cc

Issue 3260001: Force relinking of paged space if first attempt to recommit from space fails. (Closed)
Patch Set: Virtualizing block deallocation Created 10 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
« no previous file with comments | « no previous file | src/mark-compact.h » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 } 533 }
534 } 534 }
535 } 535 }
536 536
537 537
538 void Heap::EnsureFromSpaceIsCommitted() { 538 void Heap::EnsureFromSpaceIsCommitted() {
539 if (new_space_.CommitFromSpaceIfNeeded()) return; 539 if (new_space_.CommitFromSpaceIfNeeded()) return;
540 540
541 // Committing memory to from space failed. 541 // Committing memory to from space failed.
542 // Try shrinking and try again. 542 // Try shrinking and try again.
543 PagedSpaces spaces;
544 for (PagedSpace* space = spaces.next();
545 space != NULL;
546 space = spaces.next()) {
547 space->RelinkPageListInChunkOrder(true);
548 }
549
543 Shrink(); 550 Shrink();
544 if (new_space_.CommitFromSpaceIfNeeded()) return; 551 if (new_space_.CommitFromSpaceIfNeeded()) return;
545 552
546 // Committing memory to from space failed again. 553 // Committing memory to from space failed again.
547 // Memory is exhausted and we will die. 554 // Memory is exhausted and we will die.
548 V8::FatalProcessOutOfMemory("Committing semi space failed."); 555 V8::FatalProcessOutOfMemory("Committing semi space failed.");
549 } 556 }
550 557
551 558
552 class ClearThreadJSFunctionResultCachesVisitor: public ThreadVisitor { 559 class ClearThreadJSFunctionResultCachesVisitor: public ThreadVisitor {
(...skipping 4324 matching lines...) Expand 10 before | Expand all | Expand 10 after
4877 void ExternalStringTable::TearDown() { 4884 void ExternalStringTable::TearDown() {
4878 new_space_strings_.Free(); 4885 new_space_strings_.Free();
4879 old_space_strings_.Free(); 4886 old_space_strings_.Free();
4880 } 4887 }
4881 4888
4882 4889
4883 List<Object*> ExternalStringTable::new_space_strings_; 4890 List<Object*> ExternalStringTable::new_space_strings_;
4884 List<Object*> ExternalStringTable::old_space_strings_; 4891 List<Object*> ExternalStringTable::old_space_strings_;
4885 4892
4886 } } // namespace v8::internal 4893 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698