Fixed heap usage calculation

This commit is contained in:
Benjamin Vedder 2022-03-25 17:21:54 +01:00
parent d9f3b85171
commit 7c82096df1
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ void lispif_process_cmd(unsigned char *data, unsigned int len,
lbm_get_heap_state(&heap_state); lbm_get_heap_state(&heap_state);
if (heap_state.gc_num > 0) { if (heap_state.gc_num > 0) {
heap_use = 100.0 * (float)(HEAP_SIZE - heap_state.gc_recovered) / (float)HEAP_SIZE; heap_use = 100.0 * (float)(HEAP_SIZE - heap_state.gc_last_free) / (float)HEAP_SIZE;
} }
mem_use = 100.0 * (float)(lbm_memory_num_words() - lbm_memory_num_free()) / (float)lbm_memory_num_words(); mem_use = 100.0 * (float)(lbm_memory_num_words() - lbm_memory_num_free()) / (float)lbm_memory_num_words();