This repository was archived by the owner on Dec 29, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,16 +136,14 @@ void EventBuffer::FreezePrefixSlots() {
136136}
137137
138138uint32_t * EventBuffer::ExpandAndAddSlots (size_t count) {
139- Chunk* new_chunk = new Chunk (chunk_limit_);
140- new_chunk->size = count;
141-
142139 // Publish the final size of the old chunk.
143- current_->published_size .store (current_->size ,
144- platform::memory_order_release);
140+ Flush ();
145141
146142 // Publish that we have a new 'count' sized chunk.
147143 // This must come after the store to published_size as it signifies that no
148144 // further updates will be made to published_size.
145+ Chunk* new_chunk = new Chunk (chunk_limit_);
146+ new_chunk->size = count;
149147 current_->next .store (new_chunk, platform::memory_order_release);
150148
151149 // Make new chunk current (does not modify shared state).
You can’t perform that action at this time.
0 commit comments