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

Side by Side Diff: src/heap-inl.h

Issue 10933124: Do 2 GCs on LowMemoryNotification instead of 7. Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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/heap.cc ('k') | src/mark-compact.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 } 767 }
768 768
769 769
770 DisallowAllocationFailure::~DisallowAllocationFailure() { 770 DisallowAllocationFailure::~DisallowAllocationFailure() {
771 #ifdef DEBUG 771 #ifdef DEBUG
772 HEAP->disallow_allocation_failure_ = old_state_; 772 HEAP->disallow_allocation_failure_ = old_state_;
773 #endif 773 #endif
774 } 774 }
775 775
776 776
777 FlushEagerly::FlushEagerly() {
778 old_state_ = HEAP->flush_eagerly();
779 HEAP->set_flush_eagerly(true);
780 }
781
782
783 FlushEagerly::~FlushEagerly() {
784 HEAP->set_flush_eagerly(old_state_);
785 }
786
787
777 #ifdef DEBUG 788 #ifdef DEBUG
778 AssertNoAllocation::AssertNoAllocation() { 789 AssertNoAllocation::AssertNoAllocation() {
779 Isolate* isolate = ISOLATE; 790 Isolate* isolate = ISOLATE;
780 active_ = !isolate->optimizing_compiler_thread()->IsOptimizerThread(); 791 active_ = !isolate->optimizing_compiler_thread()->IsOptimizerThread();
781 if (active_) { 792 if (active_) {
782 old_state_ = isolate->heap()->allow_allocation(false); 793 old_state_ = isolate->heap()->allow_allocation(false);
783 } 794 }
784 } 795 }
785 796
786 797
(...skipping 21 matching lines...) Expand all
808 AssertNoAllocation::~AssertNoAllocation() { } 819 AssertNoAllocation::~AssertNoAllocation() { }
809 DisableAssertNoAllocation::DisableAssertNoAllocation() { } 820 DisableAssertNoAllocation::DisableAssertNoAllocation() { }
810 DisableAssertNoAllocation::~DisableAssertNoAllocation() { } 821 DisableAssertNoAllocation::~DisableAssertNoAllocation() { }
811 822
812 #endif 823 #endif
813 824
814 825
815 } } // namespace v8::internal 826 } } // namespace v8::internal
816 827
817 #endif // V8_HEAP_INL_H_ 828 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698