| 5714 | } |
| 5715 | |
| 5716 | void* allocate(size_t size) |
| 5717 | { |
| 5718 | void* result = allocate_nothrow(size); |
| 5719 | |
| 5720 | if (!result) |
| 5721 | { |
| 5722 | #ifdef PUGIXML_NO_EXCEPTIONS |
| 5723 | assert(error_handler); |
| 5724 | longjmp(*error_handler, 1); |
| 5725 | #else |
| 5726 | throw std::bad_alloc(); |
| 5727 | #endif |
| 5728 | } |
| 5729 | |
| 5730 | return result; |
| 5731 | } |
| 5732 | |
| 5733 | void* reallocate(void* ptr, size_t old_size, size_t new_size) |
| 5734 | { |
no outgoing calls
no test coverage detected