mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-29 16:51:30 +00:00
core/unix/main: Print memory info (peak memory) when TREZOR_LOG_MEMORY env var is set. Part of #194
This commit is contained in:
parent
813beda90d
commit
91007bafe9
@ -653,7 +653,11 @@ MP_NOINLINE int main_(int argc, char **argv) {
|
||||
}
|
||||
|
||||
#if MICROPY_PY_MICROPYTHON_MEM_INFO
|
||||
if (mp_verbose_flag) {
|
||||
char *env_str_trezor_log_memory = getenv("TREZOR_LOG_MEMORY");
|
||||
if (!env_str_trezor_log_memory || atoi(env_str_trezor_log_memory) == 0) {
|
||||
env_str_trezor_log_memory = NULL;
|
||||
}
|
||||
if (mp_verbose_flag || env_str_trezor_log_memory) {
|
||||
mp_micropython_mem_info(0, NULL);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user