Lines Matching defs:segment
86 // Un-poison the kept segment content so we can zap and re-use it.
103 // will observe value including memory from the head segment.
124 void Zone::ReleaseSegment(Segment* segment) {
125 // Un-poison the segment content so we can re-use or zap it later.
126 ASAN_UNPOISON_MEMORY_REGION(reinterpret_cast<void*>(segment->start()),
127 segment->capacity());
128 allocator_->ReturnSegment(segment, supports_compression());
137 // Compute the new segment size. We use a 'high water mark'
138 // strategy, where we increase the segment size every time we expand
139 // except that we employ a maximum segment size when we delete. This
154 // Limit the size of new segments to avoid growing the segment size
156 // All the while making sure to allocate a segment large enough to hold the
163 Segment* segment =
165 if (segment == nullptr) {
169 DCHECK_GE(segment->total_size(), new_size);
170 segment_bytes_allocated_ += segment->total_size();
171 segment->set_zone(this);
172 segment->set_next(segment_head_);
175 // from the previous head segment.
177 segment_head_ = segment;
178 allocator_->TraceAllocateSegment(segment);
180 // Recompute 'top' and 'limit' based on the new segment.
181 Address result = RoundUp(segment->start(), kAlignmentInBytes);
184 // (Should not happen since the segment is guaranteed to accommodate
187 limit_ = segment->end();
214 // Un-poison the trailing segment content so we can re-use or zap it later.