| 36 | } |
| 37 | |
| 38 | void* do_reallocate(void* p, fl::size old_bytes, fl::size new_bytes) override { |
| 39 | void* result = fl::realloc(p, new_bytes); |
| 40 | if (result && new_bytes > old_bytes) { |
| 41 | // Zero-initialize newly allocated region |
| 42 | fl::memset(static_cast<char*>(result) + old_bytes, 0, new_bytes - old_bytes); |
| 43 | } |
| 44 | return result; |
| 45 | } |
| 46 | |
| 47 | bool do_is_equal(const memory_resource& other) const FL_NOEXCEPT override { |
| 48 | return this == &other; |