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

Method allocate

gecode/gist/node.hpp:37–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35
36 template<class T>
37 void
38 NodeAllocatorBase<T>::allocate(void) {
39 cur_b++;
40 cur_t = 0;
41 if (cur_b==n) {
42 int oldn = n;
43 n = static_cast<int>(n*1.5+1.0);
44 b = heap.realloc<Block*>(b,oldn,n);
45 }
46 b[cur_b] = static_cast<Block*>(heap.ralloc(sizeof(Block)));
47 }
48
49 template<class T>
50 NodeAllocatorBase<T>::NodeAllocatorBase(bool bab)

Callers 3

setNumberOfChildrenMethod · 0.45
TreeCanvasMethod · 0.45
resetMethod · 0.45

Calls 1

rallocMethod · 0.45

Tested by

no test coverage detected