| 36 | } |
| 37 | |
| 38 | void |
| 39 | ArenaWriter::realloc(size_t n) { |
| 40 | auto text = this->view(); // Current data. |
| 41 | auto span = _arena.require(n).remnant().rebind<char>(); |
| 42 | const_cast<char *&>(_buffer) = span.data(); |
| 43 | _capacity = span.size(); |
| 44 | memcpy(_buffer, text.data(), text.size()); |
| 45 | } |
| 46 | |
| 47 | }} // namespace swoc::SWOC_VERSION_NS |