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

Method allocated

src/backend/common/DefaultMemoryManager.cpp:227–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227size_t DefaultMemoryManager::allocated(void *ptr) {
228 if (!ptr) { return 0; }
229 memory_info &current = this->getCurrentMemoryInfo();
230 auto locked_iter = current.locked_map.find(ptr);
231 if (locked_iter == current.locked_map.end()) { return 0; }
232 return (locked_iter->second).bytes;
233}
234
235void DefaultMemoryManager::unlock(void *ptr, bool user_unlock) {
236 // Shortcut for empty arrays

Callers 4

getAllocatedBytesMethod · 0.45
getAllocatedBytesMethod · 0.45
getAllocatedBytesMethod · 0.45
getAllocatedBytesMethod · 0.45

Calls 1

findMethod · 0.80

Tested by

no test coverage detected