mcache

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 1 Imported by: 0

Documentation

Overview

Package mcache provides cache for byte slice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalIndex

func CalIndex(capacity int) int

CalIndex returns the power of two index of the given capacity.

func Free

func Free(p []byte)

Free recycles a byte slice.

func Malloc

func Malloc(size int, capacity ...int) []byte

Malloc creates a byte slice with the same parameters as make. Recycle the slice with Free.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL