ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/utils/residentMem.c
(Generate patch)

Comparing trunk/src/utils/residentMem.c (file contents):
Revision 340 by gezelter, Tue Feb 15 05:05:33 2005 UTC vs.
Revision 343 by gezelter, Tue Feb 15 06:11:22 2005 UTC

# Line 2 | Line 2
2   #include <string.h>
3   #include <stdio.h>
4  
5 + #define to_string( s ) # s
6 + #define STR_DEFINE(t, s) t = to_string(s)
7 +
8 +
9   double residentMem () {
10  
11    FILE* procresults;
12    char buf[150];
13    char* foo;
14    long int myRSS, totRSS;
15 <  char* pscommand;
15 >  char pscommand[150];
16 >  char* psPath;
17  
18 <  pscommand = strdup("PS");
18 >  STR_DEFINE(psPath, PSCOMMAND );
19  
20 +  strncpy(pscommand, psPath, strlen(psPath));
21 +
22   #if PSTYPE == BSD
23    strcat(pscommand, " ax -o rss");
24   #else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines