|
@@ -22,6 +22,7 @@
|
|
|
* @brief Parse the DMMLIB_OPTS enviroment variable.
|
|
|
*/
|
|
|
|
|
|
+#include <inttypes.h>
|
|
|
#include <stdlib.h>
|
|
|
#include <string.h>
|
|
|
#include <stdio.h>
|
|
@@ -66,6 +67,16 @@ void parse_env(void) {
|
|
|
}
|
|
|
#endif /* WITH_DEBUG */
|
|
|
|
|
|
+ env = getenv("DMMLIB_SYSALLOC_SZ");
|
|
|
+
|
|
|
+ if(env != NULL) {
|
|
|
+ char *end;
|
|
|
+ uintmax_t num = strtoumax(env, &end, 10);
|
|
|
+ if(num != UINTMAX_MAX) {
|
|
|
+ systemallocator.dmm_knobs.sys_alloc_size = (double) num;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
systemallocator.initialized = true;
|
|
|
|
|
|
return;
|