| 33 | |
| 34 | template <typename T> |
| 35 | void* AllocFunction(void*, T items, T size) { |
| 36 | const size_t maxItems = SIZE_MAX / size; |
| 37 | if (maxItems < items) { |
| 38 | return nullptr; |
| 39 | } |
| 40 | return malloc(static_cast<size_t>(items) * static_cast<size_t>(size)); |
| 41 | } |
| 42 | |
| 43 | void FreeFunction(void*, void* address) { |
| 44 | free(address); |
nothing calls this directly
no outgoing calls
no test coverage detected