libtcmalloc-sys 0.1.14

Sys crate wrapping the tcmalloc allocator
Documentation
[package]
name = "libtcmalloc-sys"
version = "0.1.14"
edition = "2024"
rust-version = "1.87.0"
description = "Sys crate wrapping the tcmalloc allocator"
repository = "https://github.com/maratik123/tcmalloc-better/tree/main/libtcmalloc-sys"
license = "MIT"
keywords = ["tcmalloc", "allocator", "memory", "performance"]
categories = ["memory-management", "api-bindings"]
authors = ["Marat Bukharov <marat.buharov@gmail.com>"]
exclude = [
    "/c_src/tcmalloc/ci",
    "/c_src/tcmalloc/docs",
    "/c_src/tcmalloc/tcmalloc/.github",
    "/c_src/tcmalloc/tcmalloc/testing",
    "/c_src/abseil-cpp/.github",
    "/c_src/abseil-cpp/ci",
    "/c_src/abseil-cpp/CMake",
    "/c_src/**/testdata",
    "/c_src/**/*_test.cc",
    "/c_src/**/*_test_helper.cc",
    "/c_src/**/*_fuzz.cc",
    "/c_src/**/*_benchmark.cc",
    "/c_src/**/*_test.h",
    "/c_src/**/*_test_helper.h",
    "/c_src/**/*_fuzz.h",
    "/c_src/**/*_benchmark.h",
    "/c_src/**/*.cmake",
    "/c_src/**/*.py",
    "/c_src/**/*.bzl",
    "/c_src/**/*.bzlmod",
    "/c_src/**/CMakeLists.txt",
    "/c_src/**/*.bazel",
    "/c_src/**/.bazelrc",
    "/c_src/**/BUILD",
    "/c_src/**/WORKSPACE",
]
links = "tcmalloc"

[dependencies]
libc = "0.2"
document-features = "0.2"

[build-dependencies]
cc = { version = "1", features = ["parallel"] }
patch = "0.7"
strum = { version = "0.27", features = ["derive"] }

[features]
default = ["8k_pages", "extension"]
## TCMalloc extension API
extension = []
## Enable NUMA-aware allocation. Need to use `TCMALLOC_NUMA_AWARE` environment variable at runtime.
## See [TCMalloc comments](https://github.com/google/tcmalloc/blob/master/tcmalloc/internal/numa.cc#L54)
numa_aware = []
## Use deprecated per-thread caching. Newer systems with Linux kernel version >= 4.18 should not use this.
deprecated_perthread = []
## Use legacy locking. See [TCMalloc docs](https://github.com/google/tcmalloc/blob/master/docs/design.md#tcmalloc-backend)
legacy_locking = []

#! ### Logical Page Sizes (These features are mutually exclusive).
#! Larger page size leads to greater performance in expense to increased fragmentation.
#! See [TCMalloc tuning guide](https://github.com/google/tcmalloc/blob/master/docs/tuning.md#the-logical-page-size-for-tcmalloc)

## 8k pages
8k_pages = []
## Large pages
32k_pages = []
## 256k pages
256k_pages = []
## 4k pages, option for memory-constrained systems
small_but_slow = []

#! ### Madvise Transparent Hugepages control (Use no more than one value)
#! By default, if none of these features are enabled, madvise hugepages will be enabled.

## Disable madvise hugepages
disable_madv_hugepage_always = []
## Disable madvise hugepages via environment variable `TCMALLOC_DISABLE_MADV_HUGEPAGE` at runtime.
## This variable can be set to `0` or `1` to enable or disable madvise hugepages respectively.
disable_madv_hugepage_by_var = []

[package.metadata.docs.rs]
features = ["extension", "8k_pages"]
# enable features in the documentation
rustdoc-args = ["--cfg", "docsrs"]
rustc-args = ["--cfg", "docsrs"]