MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / GetLH

Method GetLH

comp/python_comp.cpp:227–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225
226 public:
227 BorrowedLocalHeap GetLH()
228 {
229 std::lock_guard lock(m);
230 if (heaps.Size())
231 {
232 auto tmp = heaps.Last();
233 heaps.SetSize(heaps.Size()-1);
234 // cout << "reuse existing lh" << endl;
235 return BorrowedLocalHeap (tmp, this);
236 }
237
238 // cout << "create new lh" << endl;
239 return BorrowedLocalHeap(new LocalHeap(global_heapsize, "python-comp lh", true), this);
240 }
241
242 void ReturnLH (LocalHeap * lh)
243 {

Callers 1

Calls 3

BorrowedLocalHeapClass · 0.85
SizeMethod · 0.45
SetSizeMethod · 0.45

Tested by

no test coverage detected