| 63 | const_pointer address(const_reference x) const noexcept { return &x; } |
| 64 | |
| 65 | pointer allocate(size_type n, const void* /*hint*/ = 0) { |
| 66 | nb_custom_allocs++; |
| 67 | |
| 68 | pointer ptr = static_cast<pointer>(std::malloc(n * sizeof(T))); |
| 69 | if (ptr == nullptr) { |
| 70 | #ifdef TSL_OH_NO_EXCEPTIONS |
| 71 | std::abort(); |
| 72 | #else |
| 73 | throw std::bad_alloc(); |
| 74 | #endif |
| 75 | } |
| 76 | |
| 77 | return ptr; |
| 78 | } |
| 79 | |
| 80 | void deallocate(T* p, size_type /*n*/) { std::free(p); } |
| 81 |
nothing calls this directly
no outgoing calls
no test coverage detected