MCPcopy Create free account
hub / github.com/apache/arrow / GcAndTryAgain

Method GcAndTryAgain

r/src/memorypool.cpp:58–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 private:
57 template <typename Call>
58 arrow::Status GcAndTryAgain(const Call& call) {
59 if (call().ok()) {
60 return arrow::Status::OK();
61 } else {
62 // ARROW-10080: Allocation may fail spuriously since the garbage collector is lazy.
63 // Force it to run then try again in case any reusable allocations have been freed.
64 arrow::Status r_call = SafeCallIntoRVoid([] {
65 cpp11::function gc = cpp11::package("base")["gc"];
66 gc();
67 });
68 ARROW_RETURN_NOT_OK(r_call);
69 return call();
70 }
71 }
72
73 arrow::MemoryPool* pool_;
74};

Callers

nothing calls this directly

Calls 4

SafeCallIntoRVoidFunction · 0.85
callFunction · 0.50
OKFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected