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

Unified Diff: src/heap/heap.h

Issue 1114563002: Remove the weak list of array buffers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index d019293c7b0e08cac803f3a6dfb756100b500c60..75e47ea4d3e88de9b8f7fb9b729058eb83779292 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -6,6 +6,7 @@
#define V8_HEAP_HEAP_H_
#include <cmath>
+#include <map>
#include "src/allocation.h"
#include "src/assert-scope.h"
@@ -874,16 +875,6 @@ class Heap {
}
Object* native_contexts_list() const { return native_contexts_list_; }
- void set_array_buffers_list(Object* object) { array_buffers_list_ = object; }
- Object* array_buffers_list() const { return array_buffers_list_; }
-
- void set_last_array_buffer_in_list(Object* object) {
- last_array_buffer_in_list_ = object;
- }
- Object* last_array_buffer_in_list() const {
- return last_array_buffer_in_list_;
- }
-
void set_allocation_sites_list(Object* object) {
allocation_sites_list_ = object;
}
@@ -1490,6 +1481,11 @@ class Heap {
bool deserialization_complete() const { return deserialization_complete_; }
+ void RegisterNewArrayBuffer(void* data, size_t length);
+ void UnregisterArrayBuffer(void* data);
+ void RegisterLiveArrayBuffer(void* data);
+ void FreeDeadArrayBuffers();
+
protected:
// Methods made available to tests.
@@ -1660,8 +1656,6 @@ class Heap {
// Weak list heads, threaded through the objects.
// List heads are initialized lazily and contain the undefined_value at start.
Object* native_contexts_list_;
- Object* array_buffers_list_;
- Object* last_array_buffer_in_list_;
Object* allocation_sites_list_;
// List of encountered weak collections (JSWeakMap and JSWeakSet) during
@@ -1995,7 +1989,6 @@ class Heap {
void MarkCompactEpilogue();
void ProcessNativeContexts(WeakObjectRetainer* retainer);
- void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool stop_after_young);
void ProcessAllocationSites(WeakObjectRetainer* retainer);
// Deopts all code that contains allocation instruction which are tenured or
@@ -2156,6 +2149,9 @@ class Heap {
bool concurrent_sweeping_enabled_;
+ std::map<void*, size_t> live_array_buffers_;
+ std::map<void*, size_t> not_yet_discovered_array_buffers_;
+
friend class AlwaysAllocateScope;
friend class Deserializer;
friend class Factory;
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698