Changeset 6142


Ignore:
Timestamp:
Apr 7, 2007, 3:18:42 AM (13 years ago)
Author:
gb
Message:

Patch from Andi Kleen: set vmemoryuse (RLIMIT_AS) current resource
limit to max limit, since some distros limit it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lisp-kernel/pmcl-kernel.c

    r5683 r6142  
    579579#endif
    580580
     581void
     582raise_limit()
     583{
     584#ifdef RLIMIT_AS
     585  struct rlimit r;
     586  if (getrlimit(RLIMIT_AS, &r) == 0) {
     587    r.rlim_cur = r.rlim_max;
     588    setrlimit(RLIMIT_AS, &r);
     589    /* Could limit heaplimit to rlim_max here if smaller? */
     590  }
     591#endif
     592}
    581593
    582594
     
    639651  fixed_map_ok = true;
    640652#endif
     653  raise_limit();
    641654  start = mmap((void *)want,
    642655               totalsize + heap_segment_size,
Note: See TracChangeset for help on using the changeset viewer.