MCPcopy Create free account
hub / github.com/Gecode/gecode / chunk

Method chunk

gecode/kernel/memory/region.cpp:42–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers 2

region.hppFile · 0.80
~RegionMethod · 0.80

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected