MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zstd_meminit

Function zstd_meminit

freebsd/contrib/openzfs/module/zstd/zfs_zstd.c:671–685  ·  view source on GitHub ↗

Initialize zstd-related memory handling */

Source from the content-addressed store, hash-verified

669
670/* Initialize zstd-related memory handling */
671static int __init
672zstd_meminit(void)
673{
674 zstd_mempool_init();
675
676 /*
677 * Estimate the size of the fallback decompression context.
678 * The expected size on x64 with current ZSTD should be about 160 KB.
679 */
680 create_fallback_mem(&zstd_dctx_fallback,
681 P2ROUNDUP(ZSTD_estimateDCtxSize() + sizeof (struct zstd_kmem),
682 PAGESIZE));
683
684 return (0);
685}
686
687/* Release object from pool and free memory */
688static void __exit

Callers 1

zstd_initFunction · 0.85

Calls 3

zstd_mempool_initFunction · 0.85
create_fallback_memFunction · 0.85
ZSTD_estimateDCtxSizeFunction · 0.50

Tested by

no test coverage detected