MCPcopy
hub / github.com/dgraph-io/dgraph / FreePack

Function FreePack

codec/codec.go:46–55  ·  view source on GitHub ↗
(pack *pb.UidPack)

Source from the content-addressed store, hash-verified

44var blockSize = int(unsafe.Sizeof(pb.UidBlock{}))
45
46func FreePack(pack *pb.UidPack) {
47 if pack == nil {
48 return
49 }
50 if pack.AllocRef == 0 {
51 return
52 }
53 alloc := z.AllocatorFrom(pack.AllocRef)
54 alloc.Release()
55}
56
57func (e *Encoder) packBlock() {
58 if len(e.uids) == 0 {

Callers 15

processReqChMethod · 0.92
benchmarkPackFunction · 0.92
freeMethod · 0.92
TestUidPackFunction · 0.85
TestBufferUidPackFunction · 0.85
TestSeekFunction · 0.85

Calls 1

ReleaseMethod · 0.80

Tested by 14

TestUidPackFunction · 0.68
TestBufferUidPackFunction · 0.68
TestSeekFunction · 0.68
TestLinearSeekFunction · 0.68
TestDecoderFunction · 0.68
benchmarkUidPackEncodeFunction · 0.68