MCPcopy Create free account
hub / github.com/google/re2j / alloc

Method alloc

java/com/google/re2j/Machine.java:168–178  ·  view source on GitHub ↗
(Inst inst)

Source from the content-addressed store, hash-verified

166 // alloc() allocates a new thread with the given instruction.
167 // It uses the free pool if possible.
168 private Thread alloc(Inst inst) {
169 Thread t;
170 if (poolSize > 0) {
171 poolSize--;
172 t = pool[poolSize];
173 } else {
174 t = new Thread(matchcap.length);
175 }
176 t.inst = inst;
177 return t;
178 }
179
180 // Frees all threads on the thread queue, returning them to the free pool.
181 private void free(Queue queue) {

Callers 1

addMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected