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