Skip to content

Commit

Permalink
Fix memory_usage to not multiply by blocks-es.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdaum committed Jan 13, 2024
1 parent fee8fc4 commit def5905
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/kernel/src/builtins/bf_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,8 @@ async fn bf_memory_usage<'a>(bf_args: &mut BfCallState<'a>) -> Result<BfRet, Err
// currently free.
// So for our purposes, block-size = our page size, nfree is vm_size - vm_rss, and nused is vm_rss.
let block_size = v_int(page_size);
let nused = v_int(vm_rss * page_size);
let nfree = v_int((vm_size - vm_rss) * page_size);
let nused = v_int(vm_rss);
let nfree = v_int((vm_size - vm_rss));

Ok(Ret(v_list(&[block_size, nused, nfree])))
}
Expand Down

0 comments on commit def5905

Please sign in to comment.