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

Side by Side Diff: src/spaces.h

Issue 258733013: Simplify old space allocation strategy. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 1907
1908 void DecreaseUnsweptFreeBytes(Page* p) { 1908 void DecreaseUnsweptFreeBytes(Page* p) {
1909 ASSERT(ShouldBeSweptBySweeperThreads(p)); 1909 ASSERT(ShouldBeSweptBySweeperThreads(p));
1910 unswept_free_bytes_ -= (p->area_size() - p->LiveBytes()); 1910 unswept_free_bytes_ -= (p->area_size() - p->LiveBytes());
1911 } 1911 }
1912 1912
1913 void ResetUnsweptFreeBytes() { 1913 void ResetUnsweptFreeBytes() {
1914 unswept_free_bytes_ = 0; 1914 unswept_free_bytes_ = 0;
1915 } 1915 }
1916 1916
1917 // This function tries to steal size_in_bytes memory from the sweeper threads
1918 // free-lists. If it does not succeed stealing enough memory, it will wait
1919 // for the sweeper threads to finish sweeping.
1920 // It returns true when sweeping is completed and false otherwise.
1921 bool EnsureSweeperProgress(intptr_t size_in_bytes);
1922
1923 Page* FirstPage() { return anchor_.next_page(); } 1917 Page* FirstPage() { return anchor_.next_page(); }
1924 Page* LastPage() { return anchor_.prev_page(); } 1918 Page* LastPage() { return anchor_.prev_page(); }
1925 1919
1926 void EvictEvacuationCandidatesFromFreeLists(); 1920 void EvictEvacuationCandidatesFromFreeLists();
1927 1921
1928 bool CanExpand(); 1922 bool CanExpand();
1929 1923
1930 // Returns the number of total pages in this space. 1924 // Returns the number of total pages in this space.
1931 int CountTotalPages(); 1925 int CountTotalPages();
1932 1926
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
2966 } 2960 }
2967 // Must be small, since an iteration is used for lookup. 2961 // Must be small, since an iteration is used for lookup.
2968 static const int kMaxComments = 64; 2962 static const int kMaxComments = 64;
2969 }; 2963 };
2970 #endif 2964 #endif
2971 2965
2972 2966
2973 } } // namespace v8::internal 2967 } } // namespace v8::internal
2974 2968
2975 #endif // V8_SPACES_H_ 2969 #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