| 92 | namespace |
| 93 | { |
| 94 | auto checked_malloc(const size_t size) -> void* |
| 95 | { |
| 96 | if (void* ptr = std::malloc(size)) |
| 97 | return ptr; |
| 98 | throw std::bad_alloc(); |
| 99 | } |
| 100 | |
| 101 | auto checked_calloc(const size_t count, const size_t size) -> void* |
| 102 | { |
no outgoing calls
no test coverage detected