diff --git a/darshan-runtime/darshan-core.h b/darshan-runtime/darshan-core.h index 652c189a9d467a030a7e8e96558fa93f6558ed40..2ebf8b9b353d74dd825cb75c6a31b35017763304 100644 --- a/darshan-runtime/darshan-core.h +++ b/darshan-runtime/darshan-core.h @@ -48,7 +48,7 @@ struct darshan_core_runtime struct darshan_core_record_ref *rec_hash; int rec_count; struct darshan_core_module* mod_array[DARSHAN_MAX_MODS]; - char comp_buf[DARSHAN_COMP_BUF_SIZE]; + char *comp_buf; double wtime_offset; char *trailing_data; }; diff --git a/darshan-runtime/lib/darshan-core.c b/darshan-runtime/lib/darshan-core.c index a216a49717c26e2aebf6f42b2927a235e5dbc05c..b876b3ce1e8bcac9eb183528bdd52866115e144f 100644 --- a/darshan-runtime/lib/darshan-core.c +++ b/darshan-runtime/lib/darshan-core.c @@ -282,6 +282,13 @@ void darshan_core_shutdown() final_core = darshan_core; darshan_core = NULL; + final_core->comp_buf = malloc(DARSHAN_COMP_BUF_SIZE); + if(!(final_core->comp_buf)) + { + darshan_core_cleanup(final_core); + return; + } + /* we also need to set which modules were registered on this process and * call into those modules and give them a chance to perform any necessary * pre-shutdown steps.