Lines Matching full:segment
34 struct Segment { struct
35 Segment *Prev; argument
36 Segment *Next; argument
41 // Each segment of the array will be laid out with the following assumptions:
43 // - Each segment will be on a cache-line address boundary (kCacheLineSize
50 // Segment, aligned properly, and the rest of the elements are accessed argument
53 // We then compute the size of the segment to follow this logic:
61 static constexpr uint64_t SegmentControlBlockSize = sizeof(Segment *) * 2;
72 "Must have at least 1 element per segment.");
74 static Segment SentinelSegment;
81 Segment *S = &SentinelSegment;
86 Iterator(Segment *IS, uint64_t Off, uint64_t S) XRAY_NEVER_INSTRUMENT in Iterator()
102 // segment pointer.
154 // segment's Data location to get the element in the position of Offset.
164 Segment *Head;
165 Segment *Tail;
169 Segment *Freelist;
179 // - S is a sentinel segment, which has the following property:
203 Segment *NewSegment() XRAY_NEVER_INSTRUMENT { in NewSegment()
255 // Placement-new the Segment element at the beginning of the SegmentBlock. in NewSegment()
256 new (SegmentBlock.Data) Segment{&SentinelSegment, &SentinelSegment, {0}}; in NewSegment()
257 auto SB = reinterpret_cast<Segment *>(SegmentBlock.Data); in NewSegment()
261 Segment *InitHeadAndTail() XRAY_NEVER_INSTRUMENT { in InitHeadAndTail()
278 Segment *AppendNewSegment() XRAY_NEVER_INSTRUMENT { in AppendNewSegment()
465 // - Each segment has N valid positions, where N > 0 in trim()
507 // Here we place the current tail segment to the freelist. To do this in trim()
533 // segment" which is the segment we are placing on the Freelist. in trim()
543 // an empty Freelist means placing a segment whose predecessor and in trim()
544 // successor is the sentinel segment. in trim()
613 // segment. in trim()
644 typename Array<T>::Segment Array<T>::SentinelSegment{