| 40 | c->next = new Chunk; c->next->next = nullptr; |
| 41 | } |
| 42 | Region::Chunk* |
| 43 | Region::Pool::chunk(void) { |
| 44 | Chunk* n; |
| 45 | { |
| 46 | Support::Lock l(m); |
| 47 | if (c != nullptr) { |
| 48 | assert(n_c > 0U); |
| 49 | n = c; c = c->next; n_c--; |
| 50 | } else { |
| 51 | n = new Region::Chunk; |
| 52 | } |
| 53 | n->reset(); |
| 54 | } |
| 55 | return n; |
| 56 | } |
| 57 | void |
| 58 | Region::Pool::chunk(Chunk* u) { |
| 59 | Support::Lock l(m); |
no test coverage detected