* feat(esp-alloc): Add heap usage stats and provide `esp_alloc::get_info!()` macro * refactor(esp-alloc): Feature gate internal memory usage that requires extra computation. - Introduce the `internal-heap-stats` feature for `esp-alloc`. - Add `esp_alloc::get_info!()` to `psram_quad` example to show usage and ensure coverage of the feature in tests. * refactor(esp-alloc): Remove `get_info!()` macro in favour of documenting `HEAP.stats()` * Implement defmt::Format for HeapStats and RegionStats * rustfmt * show usage percent + move bar drawing logic to separate functions * update doc comments * Fixed a typo in qa-test/src/bin/psram_quad.rs Co-authored-by: Scott Mabin <scott@mabez.dev> * minor improvements to write bar functions * Aligned the indentation in Cargo.toml Co-authored-by: Kirill Mikhailov <62840029+playfulFence@users.noreply.github.com> * Fixed a typo in docs Co-authored-by: Kirill Mikhailov <62840029+playfulFence@users.noreply.github.com> * Nitpicking x2 Co-authored-by: Kirill Mikhailov <62840029+playfulFence@users.noreply.github.com> * Surround a function call with backticks Co-authored-by: Kirill Mikhailov <62840029+playfulFence@users.noreply.github.com> * rustfmt --------- Co-authored-by: Anthony Grondin <104731965+AnthonyGrondin@users.noreply.github.com> Co-authored-by: Scott Mabin <scott@mabez.dev> Co-authored-by: Kirill Mikhailov <62840029+playfulFence@users.noreply.github.com>
47 lines
1.3 KiB
TOML
47 lines
1.3 KiB
TOML
[package]
|
|
name = "esp-alloc"
|
|
version = "0.5.0"
|
|
edition = "2021"
|
|
rust-version = "1.68"
|
|
description = "A heap allocator for Espressif devices"
|
|
repository = "https://github.com/esp-rs/esp-hal"
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
keywords = [
|
|
"allocator",
|
|
"esp32",
|
|
"riscv",
|
|
"xtensa",
|
|
]
|
|
categories = [
|
|
"memory-management",
|
|
"no-std",
|
|
]
|
|
|
|
[package.metadata.docs.rs]
|
|
default-target = "riscv32imc-unknown-none-elf"
|
|
features = ["nightly"]
|
|
|
|
[dependencies]
|
|
defmt = { version = "0.3.8", optional = true }
|
|
cfg-if = "1.0.0"
|
|
critical-section = "1.1.3"
|
|
enumset = "1.1.5"
|
|
linked_list_allocator = { version = "0.10.5", default-features = false, features = ["const_mut_refs"] }
|
|
document-features = "0.2.10"
|
|
|
|
[features]
|
|
default = []
|
|
nightly = []
|
|
|
|
## Implement `defmt::Format` on certain types.
|
|
defmt = ["dep:defmt"]
|
|
|
|
## Enable this feature if you want to keep stats about the internal heap usage such as:
|
|
## - Max memory usage since initialization of the heap
|
|
## - Total allocated memory since initialization of the heap
|
|
## - Total freed memory since initialization of the heap
|
|
##
|
|
## ⚠️ Note: Enabling this feature will require extra computation every time alloc/dealloc is called.
|
|
internal-heap-stats = []
|