MCPcopy Create free account
hub / github.com/apache/brpc / Copy

Method Copy

src/butil/iobuf_profiler.cpp:176–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176IOBufSample* IOBufSample::Copy(IOBufSample* ref) {
177 auto copied = IOBufSample::New();
178 copied->block = ref->block;
179 copied->count = ref->count;
180 copied->_hash_code = ref->_hash_code;
181 copied->nframes = ref->nframes;
182 iobuf::cp(copied->stack, ref->stack, sizeof(void*) * ref->nframes);
183 return copied;
184}
185
186IOBufRefSampleSharedPtr IOBufSample::CopyAndSharedWithDestroyer(IOBufSample* ref) {
187 return { Copy(ref), detail::Destroyer() };

Callers

nothing calls this directly

Calls 1

cpFunction · 0.85

Tested by

no test coverage detected