_raw->invalidate_crc();
memset(c_str()+o, 0, l);
}
- bool buffer::ptr::can_zero_copy() const
- {
- return _raw->can_zero_copy();
- }
// -- buffer::list::iterator --
/*
}
}
- bool buffer::list::can_zero_copy() const
- {
- for (std::list<ptr>::const_iterator it = _buffers.begin();
- it != _buffers.end();
- ++it)
- if (!it->can_zero_copy())
- return false;
- return true;
- }
-
bool buffer::list::is_provided_buffer(const char *dst) const
{
if (_buffers.empty())
void copy_out(unsigned o, unsigned l, char *dest) const;
- bool can_zero_copy() const;
-
unsigned wasted() const;
int cmp(const ptr& o) const;
bool contents_equal(buffer::list& other);
bool contents_equal(const buffer::list& other) const;
- bool can_zero_copy() const;
bool is_provided_buffer(const char *dst) const;
bool is_aligned(unsigned align) const;
bool is_page_aligned() const;
memcpy(c->data, data, len);
return c;
}
- virtual bool can_zero_copy() const {
- return false;
- }
virtual bool is_shareable() {
// true if safe to reference/share the existing buffer copy
// false if it is not safe to share the buffer, e.g., due to special