equal
deleted
inserted
replaced
26 long int *p_new; |
26 long int *p_new; |
27 |
27 |
28 char *args[] = { "/usr/bin/free", "-m", NULL }; |
28 char *args[] = { "/usr/bin/free", "-m", NULL }; |
29 |
29 |
30 int size = sizeof (*p); |
30 int size = sizeof (*p); |
31 int megs = DEFAULT_MEGS * 1024 * 1024; |
31 int megs = DEFAULT_MEGS; |
32 |
32 |
33 if (argc == 2) |
33 if (argc == 2) |
34 megs = atoi (argv[1]) * 1024 * 1024; |
34 megs = atoi (argv[1]); |
35 |
35 |
36 printf ("Mem2Swap - Version 1.0\n"); |
36 printf ("Mem2Swap - Version 1.0\n"); |
37 |
37 |
38 if (!set_limit (megs)) |
38 if (!set_limit (megs)) |
39 printf ("%d MB demanded ", megs / 1024 / 1024); |
39 printf ("%d MB demanded ", megs); |
40 else { |
40 else { |
41 printf ("\tUsage: %s [MEM]\n\n", argv[0]); |
41 printf ("\tUsage: %s [MEM]\n\n", argv[0]); |
42 printf ("Report bugs to mbroeker@largo.homelinux.org\n"); |
42 printf ("Report bugs to mbroeker@largo.homelinux.org\n"); |
43 return EXIT_FAILURE; |
43 return EXIT_FAILURE; |
44 } |
44 } |