[Darshan-commits] [Git][darshan/darshan][dev-modular] move compression buffer alloc to shutdown time

Shane Snyder xgitlab at cels.anl.gov
Tue Dec 8 14:02:17 CST 2015


Shane Snyder pushed to branch dev-modular at darshan / darshan


Commits:
d097c5f1 by Shane Snyder at 2015-12-08T14:00:48Z
move compression buffer alloc to shutdown time

- - - - -


2 changed files:

- darshan-runtime/darshan-core.h
- darshan-runtime/lib/darshan-core.c


Changes:

=====================================
darshan-runtime/darshan-core.h
=====================================
--- 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;
 };


=====================================
darshan-runtime/lib/darshan-core.c
=====================================
--- 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.



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/d097c5f10377b71caf2e45c955579d2360cc4535
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20151208/55ddcfcb/attachment.html>


More information about the Darshan-commits mailing list