Commit bb9d68c0 authored by Shane Snyder's avatar Shane Snyder
Browse files

honor DARSHAN_MODMEM env variable

parent 927b8773
...@@ -195,6 +195,18 @@ void darshan_core_initialize(int argc, char **argv) ...@@ -195,6 +195,18 @@ void darshan_core_initialize(int argc, char **argv)
jobid = getpid(); jobid = getpid();
} }
/* set the memory quota for darshan modules' records */
envstr = getenv(DARSHAN_MOD_MEM_OVERRIDE);
if(envstr)
{
ret = sscanf(envstr, "%d", &tmpval);
/* silently ignore if the env variable is set poorly */
if(ret == 1 && tmpval > 0)
{
darshan_mod_mem_quota = tmpval * 1024 * 1024; /* convert from MiB */
}
}
/* allocate structure to track darshan core runtime information */ /* allocate structure to track darshan core runtime information */
init_core = malloc(sizeof(*init_core)); init_core = malloc(sizeof(*init_core));
if(init_core) if(init_core)
......
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