Disambiguate references to internal RAM from instruction RAM
This commit is contained in:
parent
d555c908a2
commit
a24774c925
|
|
@ -32,9 +32,12 @@ pub fn initialize(psram_peripheral: esp_hal::peripherals::PSRAM) {
|
|||
esp_alloc::heap_allocator!(size: HEAP_SIZE - HEAP_SIZE_RECLAIMED);
|
||||
|
||||
#[cfg(not(feature = "no-alloc-tracing"))]
|
||||
alloc_tracing::install_iram_allocator_proxy();
|
||||
alloc_tracing::install_ram_allocator_proxy();
|
||||
|
||||
info!("IRAM heap initialized!\n{}", esp_alloc::HEAP.stats());
|
||||
info!(
|
||||
"Internal RAM heap initialized!\n{}",
|
||||
esp_alloc::HEAP.stats()
|
||||
);
|
||||
|
||||
// Initialize the PSRAM allocator.
|
||||
{
|
||||
|
|
@ -47,7 +50,7 @@ pub fn initialize(psram_peripheral: esp_hal::peripherals::PSRAM) {
|
|||
));
|
||||
}
|
||||
info!(
|
||||
"PSRAM heap initialized with capacity of {} MiB!\n{}",
|
||||
"External PSRAM heap initialized with capacity of {} MiB!\n{}",
|
||||
psram_size / 1024 / 1024,
|
||||
PSRAM_ALLOCATOR.stats(),
|
||||
);
|
||||
|
|
@ -64,7 +67,7 @@ pub async fn run_alloc_stats_reporter() {
|
|||
let difference = psram_stats.current_usage as isize - psram_used_prev as isize;
|
||||
psram_used_prev = psram_stats.current_usage;
|
||||
warn!(
|
||||
"PSRAM heap usage changed: {}{}\n{psram_stats}",
|
||||
"External PSRAM heap usage changed: {}{}\n{psram_stats}",
|
||||
if difference < 0 { '-' } else { '+' },
|
||||
difference.abs()
|
||||
);
|
||||
|
|
@ -73,7 +76,7 @@ pub async fn run_alloc_stats_reporter() {
|
|||
let difference = heap_stats.current_usage as isize - heap_used_prev as isize;
|
||||
heap_used_prev = heap_stats.current_usage;
|
||||
warn!(
|
||||
"IRAM heap usage changed: {}{}\n{heap_stats}",
|
||||
"Internal RAM heap usage changed: {}{}\n{heap_stats}",
|
||||
if difference < 0 { '-' } else { '+' },
|
||||
difference.abs()
|
||||
);
|
||||
|
|
@ -317,7 +320,7 @@ mod alloc_tracing {
|
|||
#[global_allocator]
|
||||
static PROXY: TracingAllocator<EspHeap> = TracingAllocator::new();
|
||||
|
||||
pub fn install_iram_allocator_proxy() {
|
||||
pub fn install_ram_allocator_proxy() {
|
||||
PROXY.inner.with(|inner| {
|
||||
*inner = Some(&esp_alloc::HEAP);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue