Commit e984a8b5 authored by Shane Snyder's avatar Shane Snyder

cleanup darshan runtime shutdown code

parent ddf51033
......@@ -623,9 +623,15 @@ static void darshan_core_shutdown()
/* free darshan core data structures to shutdown */
static void darshan_core_cleanup(struct darshan_core_runtime* core)
{
struct darshan_core_record_ref *tmp, *ref;
int i;
/* TODO: destroy record hash */
HASH_ITER(hlink, core->rec_hash, ref, tmp)
{
HASH_DELETE(hlink, core->rec_hash, ref);
free(ref->rec.name);
free(ref);
}
for(i = 0; i < DARSHAN_MAX_MODS; i++)
{
......
......@@ -604,9 +604,15 @@ static void posix_get_output_data(
static void posix_shutdown()
{
assert(posix_runtime);
struct posix_runtime_file_ref *ref, *tmp;
HASH_ITER(hlink, posix_runtime->fd_hash, ref, tmp)
{
HASH_DELETE(hlink, posix_runtime->fd_hash, ref);
free(ref);
}
/* TODO destroy hash tables ?? */
HASH_CLEAR(hlink, posix_runtime->file_hash); /* these entries are freed all at once below */
free(posix_runtime->file_runtime_array);
free(posix_runtime->file_record_array);
......
......@@ -475,6 +475,8 @@ int darshan_log_getmod(darshan_fd fd, darshan_module_id mod_id,
*mod_buf = tmp_buf;
*mod_buf_sz = tmp_buf_sz;
/* TODO: bswaps */
return(0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment