| 144 | } |
| 145 | |
| 146 | void *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 | |
| 153 | void Allocator::nativeFree(void *ptr) { |
| 154 | AF_TRACE("nativeFree: {: >8} {}", " ", ptr); |
no test coverage detected