Discover Packages
github.com/cloudwego/kitex
internal
utils
safemcache
package
Version:
v0.11.2
Opens a new window with list of versions in this module.
Published: Sep 11, 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.
Documentation
Documentation
¶
Package safemcache wraps mcache for unsafe context.
It's only used by GRPC for now, should be removed in the future after refactoring GRPC.
Cap returns the max cap of a buf can be resized to.
See comment of `Malloc` for details
Free does nothing if buf is not created by `Malloc`.
see comment of `Malloc` for details
Malloc warps `mcache.Malloc` for unsafe context.
You should use `mcache.Malloc` directly if lifecycle of buf is clear
It appends a magic number to the end of buffer and checks it when `Free`.
Use `Cap` to get the cap of a buf created by `Malloc`
Source Files
¶
Click to show internal directories.
Click to hide internal directories.