Ignore:
Timestamp:
Feb 8, 2007, 6:23:48 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Handle architectures that don't have RLIMIT_AS (like OpenBSD).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/zzuf.c

    r1736 r1740  
    7474#if !defined SIGKILL
    7575#   define SIGKILL 9
     76#endif
     77
     78#if defined RLIMIT_AS
     79#   define ZZUF_RLIMIT_CONST RLIMIT_AS
     80#elif defined RLIMIT_VMEM
     81#   define ZZUF_RLIMIT_CONST RLIMIT_VMEM
     82#else
     83#   undef HAVE_SETRLIMIT
    7684#endif
    7785
     
    573581            rlim.rlim_cur = opts->maxmem * 1000000;
    574582            rlim.rlim_max = opts->maxmem * 1000000;
    575             setrlimit(RLIMIT_AS, &rlim);
     583            setrlimit(ZZUF_RLIMIT_CONST, &rlim);
    576584        }
    577585#endif
Note: See TracChangeset for help on using the changeset viewer.