MCPcopy Create free account
hub / github.com/ceph/ceph / append_zero2

Method append_zero2

src/common/buffer.cc:1491–1501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1489 }
1490
1491 void buffer::list::append_zero2(unsigned len)
1492 {
1493 _len += len;
1494 while (len > 0) {
1495 const auto round_size = std::min(len, always_zeroed_bptr().length());
1496 auto bptr = ptr_node::create(always_zeroed_bptr(), 0, round_size);
1497 _buffers.push_back(*bptr.release());
1498 _num += 1;
1499 len -= round_size;
1500 }
1501 }
1502
1503 void buffer::list::append_zero(unsigned len)
1504 {

Callers 2

TESTFunction · 0.80
dedupMethod · 0.80

Calls 4

createFunction · 0.70
lengthMethod · 0.45
push_backMethod · 0.45
releaseMethod · 0.45

Tested by 1

TESTFunction · 0.64