| 6373 | } |
| 6374 | |
| 6375 | void* allocate(size_t size) |
| 6376 | { |
| 6377 | void* result = allocate_nothrow(size); |
| 6378 | |
| 6379 | if (!result) |
| 6380 | { |
| 6381 | #ifdef PUGIXML_NO_EXCEPTIONS |
| 6382 | assert(error_handler); |
| 6383 | longjmp(*error_handler, 1); |
| 6384 | #else |
| 6385 | throw std::bad_alloc(); |
| 6386 | #endif |
| 6387 | } |
| 6388 | |
| 6389 | return result; |
| 6390 | } |
| 6391 | |
| 6392 | void* reallocate(void* ptr, size_t old_size, size_t new_size) |
| 6393 | { |
no outgoing calls
no test coverage detected