X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvm_power_manager%2Fpower_manager.c;h=c5cf6bffa38dd6ed46f7d37fb614becd6d161021;hb=01863b9d2354c6738581c68fbc5cda84b30862d8;hp=9d4e587b0f99369fe5710ded2135753f607e93fa;hpb=3f1fc5f2cbc57ed719f9a1b24c8e450c5a95e8db;p=dpdk.git diff --git a/examples/vm_power_manager/power_manager.c b/examples/vm_power_manager/power_manager.c index 9d4e587b0f..c5cf6bffa3 100644 --- a/examples/vm_power_manager/power_manager.c +++ b/examples/vm_power_manager/power_manager.c @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include @@ -60,16 +59,15 @@ core_info_init(void) ci = get_core_info(); ci->core_count = get_nprocs_conf(); - ci->branch_ratio_threshold = BRANCH_RATIO_THRESHOLD; ci->cd = malloc(ci->core_count * sizeof(struct core_details)); + memset(ci->cd, 0, ci->core_count * sizeof(struct core_details)); if (!ci->cd) { RTE_LOG(ERR, POWER_MANAGER, "Failed to allocate memory for core info."); return -1; } for (i = 0; i < ci->core_count; i++) { ci->cd[i].global_enabled_cpus = 1; - ci->cd[i].oob_enabled = 0; - ci->cd[i].msr_fd = 0; + ci->cd[i].branch_ratio_threshold = BRANCH_RATIO_THRESHOLD; } printf("%d cores in system\n", ci->core_count); return 0;