#include #include #include #include #include #include #include #include "logger.h" #include "shared_func.h" #include "sched_thread.h" #include "ini_file_reader.h" #include "fast_mblock.h" #include "sockopt.h" #include "system_info.h" struct my_struct { struct fast_mblock_man *mblock; void *obj; }; static int test_delay(void *args) { struct my_struct *my; my = (struct my_struct *)args; fast_mblock_free_object(my->mblock, my->obj); return 0; } int main(int argc, char *argv[]) { int result; int64_t start_time; int64_t end_time; char *filename; IniContext iniContext; int64_t mem_size; struct fast_mblock_man mblock1; struct fast_mblock_man mblock2; struct my_struct *objs; void *obj1; void *obj2; int reclaim_target; int reclaim_count; int i; int count; pthread_t schedule_tid; ScheduleArray scheduleArray; ScheduleEntry scheduleEntries[1]; volatile bool continue_flag = true; FastIFConfig if_configs[32]; struct fast_statfs stats[32]; if (argc > 1) { filename = argv[1]; } else { filename = "/etc/mc/worker.conf"; } start_time = get_current_time_ms(); srand(time(NULL)); log_init(); g_log_context.log_level = LOG_DEBUG; if ((result=iniLoadFromFile(filename, &iniContext)) != 0) { logError("file: "__FILE__", line: %d, " "load conf file \"%s\" fail, ret code: %d", __LINE__, filename, result); return result; } getifconfigs(if_configs, sizeof(if_configs) / sizeof(if_configs[0]), &count); printf("ifconfig count: %d\n", count); for (i=0; i