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

Unified Diff: src/heap/spaces.h

Issue 1683653002: Add a generic remembered set class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 3674551a13bc9310ede67754bd715b20d8f320a3..10c351ec662b95c054ef7379a4451c976e73c55e 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -398,6 +398,7 @@ class MemoryChunk {
static const size_t kWriteBarrierCounterOffset =
kSlotsBufferOffset + kPointerSize // SlotsBuffer* slots_buffer_;
+ kPointerSize // SlotSet* old_to_new_slots_;
+ + kPointerSize // SlotSet* old_to_old_slots_;
+ kPointerSize; // SkipList* skip_list_;
static const size_t kMinHeaderSize =
@@ -445,7 +446,7 @@ class MemoryChunk {
MemoryChunk::FromAddress(object->address())->IncrementLiveBytes(by);
}
- // Only works for addresses in pointer spaces, not data or code spaces.
+ // Only works for addresses in pointer spaces, not code space.
static inline MemoryChunk* FromAnyPointerAddress(Heap* heap, Address addr);
static inline uint32_t FastAddressToMarkbitIndex(Address addr) {
@@ -678,8 +679,12 @@ class MemoryChunk {
inline SlotSet* old_to_new_slots() { return old_to_new_slots_; }
+ inline SlotSet* old_to_old_slots() { return old_to_old_slots_; }
+
void AllocateOldToNewSlots();
void ReleaseOldToNewSlots();
+ void AllocateOldToOldSlots();
+ void ReleaseOldToOldSlots();
void MarkEvacuationCandidate() {
DCHECK(!IsFlagSet(NEVER_EVACUATE));
@@ -732,6 +737,7 @@ class MemoryChunk {
// set for large pages. In the latter case the number of entries in the array
// is ceil(size() / kPageSize).
SlotSet* old_to_new_slots_;
+ SlotSet* old_to_old_slots_;
SkipList* skip_list_;
intptr_t write_barrier_counter_;
// Assuming the initial allocation on a page is sequential,
@@ -781,6 +787,9 @@ class Page : public MemoryChunk {
return reinterpret_cast<Page*>(OffsetFrom(a) & ~kPageAlignmentMask);
}
+ // Only works for addresses in pointer spaces, not code space.
+ inline static Page* FromAnyPointerAddress(Heap* heap, Address addr);
+
// Returns the page containing an allocation top. Because an allocation
// top address can be the upper bound of the page, we need to subtract
// it with kPointerSize first. The address ranges from
« no previous file with comments | « src/heap/slot-set.h ('k') | src/heap/spaces.cc » ('j') | src/heap/store-buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698