/* * pmempool_info_free -- free pmem info context */ static void pmempool_info_free(struct pmem_info *pip) { if (pip->obj.stats.zone_stats) free(pip->obj.stats.zone_stats); util_options_free(pip->opts); util_ranges_clear(&pip->args.ranges); util_ranges_clear(&pip->args.obj.object_ranges); util_ranges_clear(&pip->args.obj.zone_ranges); util_ranges_clear(&pip->args.obj.chunk_ranges); util_ranges_clear(&pip->args.obj.lane_ranges); free(pip); }
/* * pmempool_info_free -- free pmem info context */ static void pmempool_info_free(struct pmem_info *pip) { if (pip->obj.stats.zone_stats) free(pip->obj.stats.zone_stats); util_options_free(pip->opts); util_ranges_clear(&pip->args.ranges); util_ranges_clear(&pip->args.obj.type_ranges); util_ranges_clear(&pip->args.obj.zone_ranges); util_ranges_clear(&pip->args.obj.chunk_ranges); util_ranges_clear(&pip->args.obj.lane_ranges); while (!TAILQ_EMPTY(&pip->obj.stats.type_stats)) { struct pmem_obj_type_stats *type = TAILQ_FIRST(&pip->obj.stats.type_stats); TAILQ_REMOVE(&pip->obj.stats.type_stats, type, next); free(type); } free(pip); }