Open johncming opened 6 years ago
func encodeFrameSize(dataBytes int) (lenField uint64, padBytes int) { lenField = uint64(dataBytes) // force 8 byte alignment so length never gets a torn write padBytes = (8 - (dataBytes % 8)) % 8 if padBytes != 0 { lenField |= uint64(0x80|padBytes) << 56 } return lenField, padBytes }
set dataBytes=5
dataBytes=5
lenField=8300000000000005h
在mac下也是预分配了很多空间
62500k 0000000000000000-0000000000000000.wal
set
dataBytes=5
lenField=8300000000000005h