/**************************************************************************\ * To test for memory leaks, set MEMORY_LEAK_DEBUG to 1 using * "configure --enable-memory-leak-debug" then execute * $ valgrind --tool=memcheck --leak-check=yes --num-callers=8 \ * --leak-resolution=med ./slurmd -Dc >valg.slurmd.out 2>&1 * * Then exercise the slurmd functionality before executing * > scontrol shutdown * * All allocated memory should be freed \**************************************************************************/ static int _slurmd_fini(void) { switch_g_node_fini(); jobacct_gather_fini(); acct_gather_profile_fini(); save_cred_state(conf->vctx); switch_fini(); slurmd_task_fini(); slurm_conf_destroy(); slurm_proctrack_fini(); slurm_auth_fini(); node_fini2(); gres_plugin_fini(); slurm_topo_fini(); slurmd_req(NULL); /* purge memory allocated by slurmd_req() */ fini_setproctitle(); slurm_select_fini(); spank_slurmd_exit(); cpu_freq_fini(); job_container_fini(); acct_gather_conf_destroy(); return SLURM_SUCCESS; }
extern int acct_gather_conf_destroy(void) { int rc; if (!inited) return SLURM_SUCCESS; rc = acct_gather_energy_fini(); rc = MAX(rc, acct_gather_filesystem_fini()); rc = MAX(rc, acct_gather_infiniband_fini()); rc = MAX(rc, acct_gather_profile_fini()); return rc; }