OutMessage.Grow

geesefs-0-30-9
Aaron Jacobs 2016-12-19 13:02:19 +11:00
parent d1ed507a5a
commit e03fa52bbf
1 changed files with 8 additions and 1 deletions

View File

@ -77,7 +77,14 @@ func (m *OutMessage) OutHeader() (h *fusekernel.OutHeader)
// Grow grows m's buffer by the given number of bytes, returning a pointer to
// the start of the new segment, which is guaranteed to be zeroed. If there is
// insufficient space, it returns nil.
func (m *OutMessage) Grow(n int) (p unsafe.Pointer)
func (m *OutMessage) Grow(n int) (p unsafe.Pointer) {
p = m.GrowNoZero(n)
if p != nil {
memclr(p, uintptr(n))
}
return
}
// GrowNoZero is equivalent to Grow, except the new segment is not zeroed. Use
// with caution!