Changeset 2521 for zzuf/trunk/src


Ignore:
Timestamp:
Jul 15, 2008, 10:15:35 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Set a default maximum memory usage value to avoid excessive swapping.
Location:
zzuf/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/libzzuf.h

    r2272 r2521  
    3232#define MAX_RATIO 5.0
    3333
     34/* The default maximum memory usage is 1024 MiB. If this value is not set,
     35 * zzuf may bring a machine down to its knees because of I/O. */
     36#define DEFAULT_MEM 1024
     37
    3438struct fuzz
    3539{
  • zzuf/trunk/src/opts.c

    r1858 r2521  
    4444    opts->checkexit = 0;
    4545    opts->verbose = 0;
    46     opts->maxmem = -1;
     46    opts->maxmem = DEFAULT_MEM;
    4747    opts->maxtime = -1;
    4848    opts->maxcpu = -1;
  • zzuf/trunk/src/zzuf.c

    r2461 r2521  
    12081208    printf("  -m, --md5                 compute the output's MD5 hash\n");
    12091209#if defined HAVE_SETRLIMIT && defined ZZUF_RLIMIT_MEM
    1210     printf("  -M, --max-memory <n>      maximum child virtual memory size in MB\n");
     1210    printf("  -M, --max-memory <n>      maximum child virtual memory in MiB (default %u)\n", DEFAULT_MEM);
    12111211#endif
    12121212    printf("  -n, --network             fuzz network input\n");
Note: See TracChangeset for help on using the changeset viewer.