Decode decodes the value pointer into the provided byte buffer.
(b []byte)
| 55 | |
| 56 | // Decode decodes the value pointer into the provided byte buffer. |
| 57 | func (p *valuePointer) Decode(b []byte) { |
| 58 | // Copy over data from b into p. Using *p=unsafe.pointer(...) leads to |
| 59 | // pointer alignment issues. See https://github.com/dgraph-io/badger/issues/1096 |
| 60 | // and comment https://github.com/dgraph-io/badger/pull/1097#pullrequestreview-307361714 |
| 61 | copy(((*[vptrSize]byte)(unsafe.Pointer(p))[:]), b[:vptrSize]) |
| 62 | } |
| 63 | |
| 64 | // header is used in value log as a header before Entry. |
| 65 | type header struct { |
no outgoing calls