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

Side by Side Diff: src/sweeper-thread.h

Issue 143283002: Move the management of the already swept pages to MarkCompactCollector (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 class SweeperThread : public Thread { 43 class SweeperThread : public Thread {
44 public: 44 public:
45 explicit SweeperThread(Isolate* isolate); 45 explicit SweeperThread(Isolate* isolate);
46 ~SweeperThread() {} 46 ~SweeperThread() {}
47 47
48 void Run(); 48 void Run();
49 void Stop(); 49 void Stop();
50 void StartSweeping(); 50 void StartSweeping();
51 void WaitForSweeperThread(); 51 void WaitForSweeperThread();
52 intptr_t StealMemory(PagedSpace* space);
53 52
54 static int NumberOfThreads(int max_available); 53 static int NumberOfThreads(int max_available);
55 54
56 private: 55 private:
57 Isolate* isolate_; 56 Isolate* isolate_;
58 Heap* heap_; 57 Heap* heap_;
59 MarkCompactCollector* collector_; 58 MarkCompactCollector* collector_;
60 Semaphore start_sweeping_semaphore_; 59 Semaphore start_sweeping_semaphore_;
61 Semaphore end_sweeping_semaphore_; 60 Semaphore end_sweeping_semaphore_;
62 Semaphore stop_semaphore_; 61 Semaphore stop_semaphore_;
63 FreeList free_list_old_data_space_;
64 FreeList free_list_old_pointer_space_;
65 FreeList private_free_list_old_data_space_; 62 FreeList private_free_list_old_data_space_;
66 FreeList private_free_list_old_pointer_space_; 63 FreeList private_free_list_old_pointer_space_;
67 volatile AtomicWord stop_thread_; 64 volatile AtomicWord stop_thread_;
68 }; 65 };
69 66
70 } } // namespace v8::internal 67 } } // namespace v8::internal
71 68
72 #endif // V8_SWEEPER_THREAD_H_ 69 #endif // V8_SWEEPER_THREAD_H_
OLDNEW
« src/mark-compact.cc ('K') | « src/spaces.h ('k') | src/sweeper-thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698