mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-10-02 06:40:47 +00:00
Make stats fields in esp alloc public (#3828)
* Update lib.rs * Update CHANGELOG.md * Update CHANGELOG.md
This commit is contained in:
parent
8c64b09ba7
commit
d02dd21871
@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- Make stats structs fields public (#3828)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
@ -192,16 +192,16 @@ pub enum MemoryCapability {
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct RegionStats {
|
pub struct RegionStats {
|
||||||
/// Total usable size of the heap region in bytes.
|
/// Total usable size of the heap region in bytes.
|
||||||
size: usize,
|
pub size: usize,
|
||||||
|
|
||||||
/// Currently used size of the heap region in bytes.
|
/// Currently used size of the heap region in bytes.
|
||||||
used: usize,
|
pub used: usize,
|
||||||
|
|
||||||
/// Free size of the heap region in bytes.
|
/// Free size of the heap region in bytes.
|
||||||
free: usize,
|
pub free: usize,
|
||||||
|
|
||||||
/// Capabilities of the memory region.
|
/// Capabilities of the memory region.
|
||||||
capabilities: EnumSet<MemoryCapability>,
|
pub capabilities: EnumSet<MemoryCapability>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Display for RegionStats {
|
impl Display for RegionStats {
|
||||||
@ -302,25 +302,25 @@ impl HeapRegion {
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct HeapStats {
|
pub struct HeapStats {
|
||||||
/// Granular stats for all the configured memory regions.
|
/// Granular stats for all the configured memory regions.
|
||||||
region_stats: [Option<RegionStats>; 3],
|
pub region_stats: [Option<RegionStats>; 3],
|
||||||
|
|
||||||
/// Total size of all combined heap regions in bytes.
|
/// Total size of all combined heap regions in bytes.
|
||||||
size: usize,
|
pub size: usize,
|
||||||
|
|
||||||
/// Current usage of the heap across all configured regions in bytes.
|
/// Current usage of the heap across all configured regions in bytes.
|
||||||
current_usage: usize,
|
pub current_usage: usize,
|
||||||
|
|
||||||
/// Estimation of the max used heap in bytes.
|
/// Estimation of the max used heap in bytes.
|
||||||
#[cfg(feature = "internal-heap-stats")]
|
#[cfg(feature = "internal-heap-stats")]
|
||||||
max_usage: usize,
|
pub max_usage: usize,
|
||||||
|
|
||||||
/// Estimation of the total allocated bytes since initialization.
|
/// Estimation of the total allocated bytes since initialization.
|
||||||
#[cfg(feature = "internal-heap-stats")]
|
#[cfg(feature = "internal-heap-stats")]
|
||||||
total_allocated: usize,
|
pub total_allocated: usize,
|
||||||
|
|
||||||
/// Estimation of the total freed bytes since initialization.
|
/// Estimation of the total freed bytes since initialization.
|
||||||
#[cfg(feature = "internal-heap-stats")]
|
#[cfg(feature = "internal-heap-stats")]
|
||||||
total_freed: usize,
|
pub total_freed: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Display for HeapStats {
|
impl Display for HeapStats {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user