MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / AllocThread

Method AllocThread

extern/re2/re2/nfa.cc:159–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159NFA::Thread* NFA::AllocThread() {
160 Thread* t = freelist_;
161 if (t != NULL) {
162 freelist_ = t->next;
163 t->ref = 1;
164 // We don't need to touch t->capture because
165 // the caller will immediately overwrite it.
166 return t;
167 }
168 arena_.emplace_back();
169 t = &arena_.back();
170 t->ref = 1;
171 t->capture = new const char*[ncapture_];
172 return t;
173}
174
175NFA::Thread* NFA::Incref(Thread* t) {
176 DCHECK(t != NULL);

Callers

nothing calls this directly

Calls 2

emplace_backMethod · 0.80
backMethod · 0.45

Tested by

no test coverage detected