MCPcopy Create free account
hub / github.com/AdaptiveCpp/AdaptiveCpp / raw_free

Method raw_free

src/runtime/omp/omp_allocator.cpp:158–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156};
157
158void omp_allocator::raw_free(void *mem) {
159#ifdef LIB_NUMA_AVAILABLE
160 {
161 std::lock_guard<std::mutex> lock(numa_amap_mutex);
162 numa_amap_t& numa_amap = get_numa_allocation_map();
163 if(auto node = numa_amap.extract(mem)){
164 size_t size_bytes = node.mapped();
165 numa_free(mem, size_bytes);
166 return;
167 }
168 }
169#endif // LIB_NUMA_AVAILABLE
170
171#if !defined(_WIN32)
172 std::free(mem);
173#else
174 _aligned_free(mem);
175#endif
176}
177
178void* omp_allocator::raw_allocate_usm(size_t bytes,
179 const allocation_hints &hints) {

Callers

nothing calls this directly

Calls 2

extractMethod · 0.80
freeFunction · 0.50

Tested by

no test coverage detected