balloon.c
static void pc_print_occupancy(page_collection_t *pc) {
    if (pc->occupancy >= 1024LL * 1024 * 1024)
        mvprintw(0, 0, "%0.2fGB pinned\n", (double)pc->occupancy / 1024 / 1024 / 1024);
    else if (pc->occupancy >= 1024LL * 1024)
        mvprintw(0, 0, "%0.2fMB pinned\n", (double)pc->occupancy / 1024 / 1024);
    else if (pc->occupancy >= 1024)
        mvprintw(0, 0, "%0.2fKB pinned\n", (double)pc->occupancy / 1024);
    else
        mvprintw(0, 0, "%lldB pinned\n", pc->occupancy);

    refresh();
}
/* Output the current amount of memory pinned in this collection. */
Output the current amount of memory pinned in this collection.
Output the current amount of memory pinned in this collection .
static void pc_print_occupancy(page_collection_t *pc) {
    if (pc->occupancy >= 1024LL * 1024 * 1024)
        mvprintw(0, 0, "%0.2fGB pinned\n", (double)pc->occupancy / 1024 / 1024 / 1024);
    else if (pc->occupancy >= 1024LL * 1024)
        mvprintw(0, 0, "%0.2fMB pinned\n", (double)pc->occupancy / 1024 / 1024);
    else if (pc->occupancy >= 1024)
        mvprintw(0, 0, "%0.2fKB pinned\n", (double)pc->occupancy / 1024);
    else
        mvprintw(0, 0, "%lldB pinned\n", pc->occupancy);
    refresh();
}
static void pc_print_occupancy ( page_collection_t * pc ) { if ( pc -> occupancy >= 1024LL * 1024 * 1024 ) mvprintw ( 0 , 0 , " \n " , ( double ) pc -> occupancy / 1024 / 1024 / 1024 ) ; else if ( pc -> occupancy >= 1024LL * 1024 ) mvprintw ( 0 , 0 , " \n " , ( double ) pc -> occupancy / 1024 / 1024 ) ; else if ( pc -> occupancy >= 1024 ) mvprintw ( 0 , 0 , " \n " , ( double ) pc -> occupancy / 1024 ) ; else mvprintw ( 0 , 0 , " \n " , pc -> occupancy ) ; refresh ( ) ; }
Output the current amount of memory pinned in this collection.
Output the current amount of memory pinned in this collection .