MCPcopy Create free account
hub / github.com/apache/cloudberry / NewPrivateRefCountEntry

Function NewPrivateRefCountEntry

src/backend/storage/buffer/bufmgr.c:296–313  ·  view source on GitHub ↗

* Fill a previously reserved refcount entry. */

Source from the content-addressed store, hash-verified

294 * Fill a previously reserved refcount entry.
295 */
296static PrivateRefCountEntry *
297NewPrivateRefCountEntry(Buffer buffer)
298{
299 PrivateRefCountEntry *res;
300
301 /* only allowed to be called when a reservation has been made */
302 Assert(ReservedRefCountEntry != NULL);
303
304 /* use up the reserved entry */
305 res = ReservedRefCountEntry;
306 ReservedRefCountEntry = NULL;
307
308 /* and fill it */
309 res->buffer = buffer;
310 res->refcount = 0;
311
312 return res;
313}
314
315/*
316 * Return the PrivateRefCount entry for the passed buffer.

Callers 2

PinBufferFunction · 0.85
PinBuffer_LockedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected