| 225 | } |
| 226 | |
| 227 | size_t DefaultMemoryManager::allocated(void *ptr) { |
| 228 | if (!ptr) { return 0; } |
| 229 | memory_info ¤t = 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 | |
| 235 | void DefaultMemoryManager::unlock(void *ptr, bool user_unlock) { |
| 236 | // Shortcut for empty arrays |
no test coverage detected