Lines Matching refs:sb
37 SharedBuffer* sb = static_cast<SharedBuffer *>(malloc(sizeof(SharedBuffer) + size)); in alloc() local
38 if (sb) { in alloc()
42 sb->mRefs.store(1, std::memory_order_relaxed); in alloc()
43 sb->mSize = size; in alloc()
44 sb->mClientMetadata = 0; in alloc()
46 return sb; in alloc()
60 SharedBuffer* sb = alloc(mSize); in edit() local
61 if (sb) { in edit()
62 memcpy(sb->data(), data(), size()); in edit()
65 return sb; in edit()
84 SharedBuffer* sb = alloc(newSize); in editResize() local
85 if (sb) { in editResize()
87 memcpy(sb->data(), data(), newSize < mySize ? newSize : mySize); in editResize()
90 return sb; in editResize()
104 SharedBuffer* sb = alloc(new_size); in reset() local
105 if (sb) { in reset()
108 return sb; in reset()