Exemple #1
0
/*
 * init_node_conf - initialize the node configuration tables and values.
 *	this should be called before creating any node or configuration
 *	entries.
 * RET 0 if no error, otherwise an error code
 */
extern int init_node_conf (void)
{
	last_node_update = time (NULL);
	int i;
	struct node_record *node_ptr;

	node_ptr = node_record_table_ptr;
	for (i = 0; i < node_record_count; i++, node_ptr++)
		purge_node_rec(node_ptr);

	node_record_count = 0;
	xfree(node_record_table_ptr);
	xhash_free(node_hash_table);

	if (config_list)	/* delete defunct configuration entries */
		(void) _delete_config_record ();
	else {
		config_list    = list_create (_list_delete_config);
		active_feature_list = list_create (_list_delete_feature);
		avail_feature_list = list_create (_list_delete_feature);
		front_end_list = list_create (destroy_frontend);
	}

	return SLURM_SUCCESS;
}
Exemple #2
0
/* node_fini2 - free memory associated with node records (except bitmaps) */
extern void node_fini2 (void)
{
	int i;
	struct node_record *node_ptr;

	if (config_list) {
		FREE_NULL_LIST(config_list);
		FREE_NULL_LIST(front_end_list);
	}

	xhash_free(node_hash_table);
	node_ptr = node_record_table_ptr;
	for (i = 0; i < node_record_count; i++, node_ptr++)
		purge_node_rec(node_ptr);

	xfree(node_record_table_ptr);
	node_record_count = 0;
}
Exemple #3
0
/* node_fini2 - free memory associated with node records (except bitmaps) */
extern void node_fini2 (void)
{
	int i;
	struct node_record *node_ptr;

	if (config_list) {
		list_destroy(config_list);
		config_list = NULL;
		list_destroy(feature_list);
		feature_list = NULL;
		list_destroy(front_end_list);
		front_end_list = NULL;
	}

	node_ptr = node_record_table_ptr;
	for (i=0; i< node_record_count; i++, node_ptr++)
		purge_node_rec(node_ptr);

	xfree(node_record_table_ptr);
	xfree(node_hash_table);
	node_record_count = 0;
}