mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
13 lines
224 B
Go
13 lines
224 B
Go
package ballast
|
|
|
|
//lint:ignore U1000 this var is actually used to allocate some memory.
|
|
var ballast []byte
|
|
|
|
func Allocate(sizeInBytes uint) {
|
|
ballast = make([]byte, 0, sizeInBytes)
|
|
}
|
|
|
|
func ReleaseForGC() {
|
|
ballast = nil
|
|
}
|