Commit d097c5f1 authored by Shane Snyder's avatar Shane Snyder

move compression buffer alloc to shutdown time

parent 26c4ff22
...@@ -48,7 +48,7 @@ struct darshan_core_runtime ...@@ -48,7 +48,7 @@ struct darshan_core_runtime
struct darshan_core_record_ref *rec_hash; struct darshan_core_record_ref *rec_hash;
int rec_count; int rec_count;
struct darshan_core_module* mod_array[DARSHAN_MAX_MODS]; struct darshan_core_module* mod_array[DARSHAN_MAX_MODS];
char comp_buf[DARSHAN_COMP_BUF_SIZE]; char *comp_buf;
double wtime_offset; double wtime_offset;
char *trailing_data; char *trailing_data;
}; };
......
...@@ -282,6 +282,13 @@ void darshan_core_shutdown() ...@@ -282,6 +282,13 @@ void darshan_core_shutdown()
final_core = darshan_core; final_core = darshan_core;
darshan_core = NULL; 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 /* 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 * call into those modules and give them a chance to perform any necessary
* pre-shutdown steps. * pre-shutdown steps.
......
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