update main #1

Merged
Sinipelto merged 240 commits from Bananymous/banan-os:main into main 2023-11-20 13:20:51 +02:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit e780eaa45f - Show all commits

View File

@ -82,8 +82,9 @@ int main()
perror("read"); perror("read");
else else
{ {
size_t percent_times_100 = 10000 * meminfo.phys_pages / meminfo.virt_pages;
printf(" vmem: %zu pages (%zu bytes)\n", meminfo.virt_pages, meminfo.page_size * meminfo.virt_pages); printf(" vmem: %zu pages (%zu bytes)\n", meminfo.virt_pages, meminfo.page_size * meminfo.virt_pages);
printf(" pmem: %zu pages (%zu bytes)\n", meminfo.phys_pages, meminfo.page_size * meminfo.phys_pages); printf(" pmem: %zu pages (%zu bytes) %zu.%02zu%%\n", meminfo.phys_pages, meminfo.page_size * meminfo.phys_pages, percent_times_100 / 100, percent_times_100 % 100);
} }
close(fd); close(fd);