MCPcopy
hub / github.com/CodisLabs/codis / MakeOffheapSlice

Function MakeOffheapSlice

pkg/utils/unsafe2/slice.go:40–45  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

38}
39
40func MakeOffheapSlice(n int) Slice {
41 if n >= 0 {
42 return newCGoSlice(n, true)
43 }
44 panic("make slice with negative size")
45}
46
47func FreeSlice(s Slice) {
48 if s != nil {

Callers 1

TestMakeCGoSliceFunction · 0.85

Calls 1

newCGoSliceFunction · 0.85

Tested by 1

TestMakeCGoSliceFunction · 0.68