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

Side by Side Diff: src/heap.h

Issue 7689002: Remove obsolete kForceCompactionMask flag for GC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Do meaningful work on LowMemoryNotification. Created 9 years, 4 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/extensions/gc-extension.cc ('k') | src/heap.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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 // Returns whether there is a chance that another major GC could 896 // Returns whether there is a chance that another major GC could
897 // collect more garbage. 897 // collect more garbage.
898 bool CollectGarbage(AllocationSpace space, GarbageCollector collector); 898 bool CollectGarbage(AllocationSpace space, GarbageCollector collector);
899 899
900 // Performs garbage collection operation. 900 // Performs garbage collection operation.
901 // Returns whether there is a chance that another major GC could 901 // Returns whether there is a chance that another major GC could
902 // collect more garbage. 902 // collect more garbage.
903 inline bool CollectGarbage(AllocationSpace space); 903 inline bool CollectGarbage(AllocationSpace space);
904 904
905 static const int kNoGCFlags = 0; 905 static const int kNoGCFlags = 0;
906 static const int kForceCompactionMask = 1; 906 static const int kMakeHeapIterableMask = 1;
907 static const int kMakeHeapIterableMask = 2;
908 907
909 // Performs a full garbage collection. If (flags & kForceCompactionMask) is 908 // Performs a full garbage collection. If (flags & kMakeHeapIterableMask) is
910 // non-zero then force compaction. If (flags & kMakeHeapIterableMask) is non- 909 // non-zero, then the slower precise sweeper is used, which leaves the heap
911 // zero, then the slower precise sweeper is used, which leaves the heap in a 910 // in a state where we can iterate over the heap visiting all objects.
912 // state where we can iterate over the heap visiting all objects.
913 void CollectAllGarbage(int flags); 911 void CollectAllGarbage(int flags);
914 912
913 // Last hope GC, should try to squeeze as much as possible.
914 void CollectAllAvailableGarbage();
915
915 // Check whether the heap is currently iterable. 916 // Check whether the heap is currently iterable.
916 bool IsHeapIterable(); 917 bool IsHeapIterable();
917 918
918 // Ensure that we have swept all spaces in such a way that we can iterate 919 // Ensure that we have swept all spaces in such a way that we can iterate
919 // over all objects. May cause a GC. 920 // over all objects. May cause a GC.
920 void EnsureHeapIsIterable(); 921 void EnsureHeapIsIterable();
921 922
922 // Last hope GC, should try to squeeze as much as possible.
923 void CollectAllAvailableGarbage();
924
925 // Notify the heap that a context has been disposed. 923 // Notify the heap that a context has been disposed.
926 int NotifyContextDisposed() { return ++contexts_disposed_; } 924 int NotifyContextDisposed() { return ++contexts_disposed_; }
927 925
928 // Utility to invoke the scavenger. This is needed in test code to 926 // Utility to invoke the scavenger. This is needed in test code to
929 // ensure correct callback for weak global handles. 927 // ensure correct callback for weak global handles.
930 void PerformScavenge(); 928 void PerformScavenge();
931 929
932 inline void increment_scan_on_scavenge_pages() { 930 inline void increment_scan_on_scavenge_pages() {
933 scan_on_scavenge_pages_++; 931 scan_on_scavenge_pages_++;
934 if (FLAG_trace_gc_verbose) { 932 if (FLAG_trace_gc_verbose) {
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
2436 2434
2437 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2435 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2438 }; 2436 };
2439 #endif // DEBUG || LIVE_OBJECT_LIST 2437 #endif // DEBUG || LIVE_OBJECT_LIST
2440 2438
2441 } } // namespace v8::internal 2439 } } // namespace v8::internal
2442 2440
2443 #undef HEAP 2441 #undef HEAP
2444 2442
2445 #endif // V8_HEAP_H_ 2443 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/extensions/gc-extension.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698