mem2swap.c
changeset 29 7abf6146898e
parent 27 81a574d60c15
child 48 b94d657a9acb
equal deleted inserted replaced
28:54addf5893ef 29:7abf6146898e
    21 int main (int argc, char **argv)
    21 int main (int argc, char **argv)
    22 {
    22 {
    23     int i, n = 0;
    23     int i, n = 0;
    24 
    24 
    25     long int *p;
    25     long int *p;
       
    26     long int *p_new;
    26 
    27 
    27     long int *p_new;
       
    28     char *args[] = { "/usr/bin/free", "-m", NULL };
    28     char *args[] = { "/usr/bin/free", "-m", NULL };
       
    29 
    29     int size = sizeof (*p);
    30     int size = sizeof (*p);
    30 
       
    31     int megs = DEFAULT_MEGS * 1024 * 1024;
    31     int megs = DEFAULT_MEGS * 1024 * 1024;
    32 
    32 
    33     if (argc == 2)
    33     if (argc == 2)
    34         megs = atoi (argv[1]) * 1024 * 1024;
    34         megs = atoi (argv[1]) * 1024 * 1024;
    35 
    35