Cargo Features

umm-malloc-sys has no features set by default.

[dependencies]
umm-malloc-sys = { version = "0.3.2", features = ["extern-critical-section", "cortex-m-interrupt-critical-section", "first-fit", "init-if-uninitialized", "hang-if-uninitialized", "enable-pie"] }
extern-critical-section

See umm_malloc_cfg.h and umm_malloc_cfgport.h

Add critical sections around allocator internals. You must supply the _umm_critical_entry() and _umm_critical_exit()
functions to implement them.

cortex-m-interrupt-critical-section

Add critical sections around allocator internals, by disabling and re-enabling interrupts when necessary.

first-fit

Use the first available block for allocation, rather than search for a better fit.

init-if-uninitialized

Every umm_malloc function checks if the heap is initialized. If the heap is not initialized, it tries to initialize it with UMM_MALLOC_CFG_HEAP_ADDR and UMM_MALLOC_CFG_HEAP_SIZE.

hang-if-uninitialized

Every umm_malloc function checks if the heap is initialized. If the heap is not initialized, it loops forever.

enable-pie

Compile the umm_malloc C code position independent (-fPIE). You'll likely want to enable it for rustc also e.g. -C relocation-model=pie.