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

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

Issue 1303263002: Concurrently unmap free pages. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | src/heap/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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 1435
1436 inline Isolate* isolate(); 1436 inline Isolate* isolate();
1437 1437
1438 void CallGCPrologueCallbacks(GCType gc_type, GCCallbackFlags flags); 1438 void CallGCPrologueCallbacks(GCType gc_type, GCCallbackFlags flags);
1439 void CallGCEpilogueCallbacks(GCType gc_type, GCCallbackFlags flags); 1439 void CallGCEpilogueCallbacks(GCType gc_type, GCCallbackFlags flags);
1440 1440
1441 inline bool OldGenerationAllocationLimitReached(); 1441 inline bool OldGenerationAllocationLimitReached();
1442 1442
1443 void QueueMemoryChunkForFree(MemoryChunk* chunk); 1443 void QueueMemoryChunkForFree(MemoryChunk* chunk);
1444 void FilterStoreBufferEntriesOnAboutToBeFreedPages(); 1444 void FilterStoreBufferEntriesOnAboutToBeFreedPages();
1445 void FreeQueuedChunks(MemoryChunk* list_head);
1445 void FreeQueuedChunks(); 1446 void FreeQueuedChunks();
1447 void WaitUntilUnmappingOfFreeChunksCompleted();
1446 1448
1447 int gc_count() const { return gc_count_; } 1449 int gc_count() const { return gc_count_; }
1448 1450
1449 bool RecentIdleNotificationHappened(); 1451 bool RecentIdleNotificationHappened();
1450 1452
1451 // Completely clear the Instanceof cache (to stop it keeping objects alive 1453 // Completely clear the Instanceof cache (to stop it keeping objects alive
1452 // around a GC). 1454 // around a GC).
1453 inline void CompletelyClearInstanceofCache(); 1455 inline void CompletelyClearInstanceofCache();
1454 1456
1455 // The roots that have an index less than this are always in old space. 1457 // The roots that have an index less than this are always in old space.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 // An ArrayBuffer moved from new space to old space. 1614 // An ArrayBuffer moved from new space to old space.
1613 void PromoteArrayBuffer(Object* buffer); 1615 void PromoteArrayBuffer(Object* buffer);
1614 1616
1615 bool HasLowAllocationRate(); 1617 bool HasLowAllocationRate();
1616 bool HasHighFragmentation(); 1618 bool HasHighFragmentation();
1617 bool HasHighFragmentation(intptr_t used, intptr_t committed); 1619 bool HasHighFragmentation(intptr_t used, intptr_t committed);
1618 1620
1619 bool ShouldOptimizeForMemoryUsage() { return optimize_for_memory_usage_; } 1621 bool ShouldOptimizeForMemoryUsage() { return optimize_for_memory_usage_; }
1620 1622
1621 private: 1623 private:
1624 class UnmapFreeMemoryTask;
1625
1622 static const int kInitialStringTableSize = 2048; 1626 static const int kInitialStringTableSize = 2048;
1623 static const int kInitialEvalCacheSize = 64; 1627 static const int kInitialEvalCacheSize = 64;
1624 static const int kInitialNumberStringCacheSize = 256; 1628 static const int kInitialNumberStringCacheSize = 256;
1625 1629
1626 Heap(); 1630 Heap();
1627 1631
1628 int current_gc_flags() { return current_gc_flags_; } 1632 int current_gc_flags() { return current_gc_flags_; }
1629 void set_current_gc_flags(int flags) { 1633 void set_current_gc_flags(int flags) {
1630 current_gc_flags_ = flags; 1634 current_gc_flags_ = flags;
1631 DCHECK(!ShouldFinalizeIncrementalMarking() || 1635 DCHECK(!ShouldFinalizeIncrementalMarking() ||
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
2289 2293
2290 // Currently set GC flags that are respected by all GC components. 2294 // Currently set GC flags that are respected by all GC components.
2291 int current_gc_flags_; 2295 int current_gc_flags_;
2292 2296
2293 ExternalStringTable external_string_table_; 2297 ExternalStringTable external_string_table_;
2294 2298
2295 VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_; 2299 VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_;
2296 2300
2297 MemoryChunk* chunks_queued_for_free_; 2301 MemoryChunk* chunks_queued_for_free_;
2298 2302
2303 base::Semaphore pending_unmap_job_semaphore_;
2304
2299 base::Mutex relocation_mutex_; 2305 base::Mutex relocation_mutex_;
2300 2306
2301 int gc_callbacks_depth_; 2307 int gc_callbacks_depth_;
2302 2308
2303 bool deserialization_complete_; 2309 bool deserialization_complete_;
2304 2310
2305 bool concurrent_sweeping_enabled_; 2311 bool concurrent_sweeping_enabled_;
2306 2312
2307 // |live_array_buffers_| maps externally allocated memory used as backing 2313 // |live_array_buffers_| maps externally allocated memory used as backing
2308 // store for ArrayBuffers to the length of the respective memory blocks. 2314 // store for ArrayBuffers to the length of the respective memory blocks.
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
2706 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2712 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2707 2713
2708 private: 2714 private:
2709 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2715 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2710 }; 2716 };
2711 #endif // DEBUG 2717 #endif // DEBUG
2712 } 2718 }
2713 } // namespace v8::internal 2719 } // namespace v8::internal
2714 2720
2715 #endif // V8_HEAP_HEAP_H_ 2721 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698