Discover Packages
gitee.com/fengzhi_1/gkit
cache
mbuffer
package
Version:
v0.0.0-...-b628505
Opens a new window with list of versions in this module.
Published: Jul 17, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
mcache
Introduction
mcache
is a memory pool which preserves memory in sync.Pool
to improve malloc performance.
The usage is quite simple: call mcache.Malloc
directly, and don't forget to Free
it!
Expand ▾
Collapse ▴
Documentation
¶
Free should be called when the buf is no longer used.
Malloc supports one or two integer argument.
The size specifies the length of the returned slice, which means len(ret) == size.
A second integer argument may be provided to specify the minimum capacity, which means cap(ret) >= cap.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.