Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
40
func
MakeOffheapSlice(n int) Slice {
41
if
n >= 0 {
42
return
newCGoSlice(n, true)
43
}
44
panic(
"make slice with negative size"
)
45
}
46
47
func
FreeSlice(s Slice) {
48
if
s != nil {
Callers
1
TestMakeCGoSlice
Function · 0.85
Calls
1
newCGoSlice
Function · 0.85
Tested by
1
TestMakeCGoSlice
Function · 0.68