--- trunk/OOPSE-2.0/src/utils/residentMem.c 2005/02/15 06:11:22 2027 +++ trunk/OOPSE-2.0/src/utils/residentMem.c 2005/02/15 06:17:03 2028 @@ -5,7 +5,6 @@ #define to_string( s ) # s #define STR_DEFINE(t, s) t = to_string(s) - double residentMem () { FILE* procresults; @@ -16,15 +15,18 @@ double residentMem () { char* psPath; STR_DEFINE(psPath, PSCOMMAND ); + + // null terminated string is one longer.... + strncpy(pscommand, psPath, strlen(psPath)+1); - strncpy(pscommand, psPath, strlen(psPath)); - #if PSTYPE == BSD strcat(pscommand, " ax -o rss"); #else strcat(pscommand, " -ef -o rss"); #endif + printf("doing %s\n", pscommand); + procresults = popen(pscommand, "r"); totRSS = 0;