Cargo Features

[dependencies]
oxidd-cache = { version = "0.6.0", default-features = false, features = ["statistics", "direct", "fifo", "lfu", "static_leak_check", "hugealloc", "parking_lot"] }
default = direct

The direct feature is set by default whenever oxidd-cache is added without default-features = false somewhere in the dependency tree.

statistics

Collect statistics about cache hits etc.

direct default

Enable the direct mapped apply cache implementation

Affects oxidd-cache::direct

fifo

Enable the FIFO apply cache implementation

Affects oxidd-cache::fifo

lfu

Enable the LFU apply cache implementation

Affects oxidd-cache::lfu

static_leak_check

Check that an apply cache is never dropped via its Drop implementation. This is done by adding a function call to a non-existing external function to the Drop implementation. So if the check fails, there will be a weird linker error. Using this feature in unoptimized builds may cause false positives.

hugealloc

Use the hugealloc crate to allocate memory

Enables allocator-api2 and hugealloc

hugealloc:

allocation with madvise for hugepages

parking_lot

Use parking_lot instead of spinlocks