2012/4/21 Németh Márton <nm...@freemail.hu>: > diff --git a/main.cpp b/main.cpp > index 0e57ee1..67db2eb 100644 > --- a/main.cpp > +++ b/main.cpp > @@ -240,6 +240,7 @@ void report(int time, int iterations, char *file) > one_measurement(time); > report_show_tunables(); > finish_report_output(); > + clear_tuning(); > } > /* and wrap up */ > learn_parameters(50, 0); > @@ -415,6 +416,7 @@ int main(int argc, char **argv) > learn_parameters(500, 0); > save_parameters("saved_parameters.powertop"); > end_pci_access(); > + clear_tuning(); > reset_display(); > > clear_all_devices();
These two chunks don't apply here. Did you create the patch against currend HEAD commit 1dfdb80d? But look fine, when applying manually. > diff --git a/tuning/tuning.cpp b/tuning/tuning.cpp > index a0c3ffa..6a359ae 100644 > --- a/tuning/tuning.cpp > +++ b/tuning/tuning.cpp > @@ -312,3 +312,15 @@ void report_show_tunables(void) > fprintf(reportout.csv_report,"\n"); > } > } > + > +void clear_tuning() > +{ > + while (!all_tunables.empty()) { > + delete all_tunables.back(); > + all_tunables.pop_back(); > + } > + while (!all_untunables.empty()) { > + delete all_untunables.back(); > + all_untunables.pop_back(); > + } > +} I'd prefer a for loop like in commit 1dfdb80d. Easier to read and should be faster than poping and always check for empty(). Greetings, Tom _______________________________________________ Power mailing list Power@bughost.org https://bughost.org/mailman/listinfo/power