MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / getMemoryPressure

Method getMemoryPressure

src/backend/common/DefaultMemoryManager.cpp:132–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132float DefaultMemoryManager::getMemoryPressure() {
133 lock_guard_t lock(this->memory_mutex);
134 memory_info &current = this->getCurrentMemoryInfo();
135 if (current.lock_bytes > current.max_bytes ||
136 current.lock_buffers > max_buffers) {
137 return 1.0;
138 } else {
139 return 0.0;
140 }
141}
142
143bool DefaultMemoryManager::jitTreeExceedsMemoryPressure(
144 size_t jit_tree_buffer_bytes) {

Callers 4

getMemoryPressureFunction · 0.45
getMemoryPressureFunction · 0.45
getMemoryPressureFunction · 0.45
getMemoryPressureFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected