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

Method nativeAlloc

src/backend/cpu/memory.cpp:146–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void *Allocator::nativeAlloc(const size_t bytes) {
147 void *ptr = malloc(bytes); // NOLINT(hicpp-no-malloc)
148 AF_TRACE("nativeAlloc: {:>7} {}", bytesToString(bytes), ptr);
149 if (!ptr) { AF_ERROR("Unable to allocate memory", AF_ERR_NO_MEM); }
150 return ptr;
151}
152
153void Allocator::nativeFree(void *ptr) {
154 AF_TRACE("nativeFree: {: >8} {}", " ", ptr);

Callers 1

Calls 1

bytesToStringFunction · 0.85

Tested by

no test coverage detected