Changeset 2521 for zzuf/trunk


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
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/doc/zzuf.1

    r2353 r2521  
    160160Specify the maximum amount of memory, in mebibytes (1 MiB = 1,048,576 bytes),
    161161that children are allowed to allocate. This is useful to detect infinite loops
    162 that eat up a lot of memory. The value should be set reasonably high so as not
    163 to interfer with normal program operation.
     162that eat up a lot of memory.
     163
     164The value should be set reasonably high so as not to interfer with normal
     165program operation. By default, it is set to 1024 MiB in order to avoid
     166accidental excessive swapping. To disable the limitation, set the maximum
     167memory usage to -1 instead.
    164168
    165169\fBzzuf\fR uses the \fBsetrlimit\fR() call to set memory usage limitations and
  • 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.