tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: RLIMIT_AS and fixed process size calculations patch



   
   > --- 502,507 ----
   > *************** uvm_mmap(struct vm_map *map, vaddr_t *ad
   > *** 1115,1120 ****
   > --- 1097,1111 ----
   >    }
   >   
   >    /*
   > +   * check resource limits
   > +   */
   > + 
   > +  if (!VM_MAP_IS_KERNEL(map) &&
   > +      (((rlim_t)curproc->p_vmspace->vm_map.size + (rlim_t)size) >
   > +      curproc->p_rlimit[RLIMIT_AS].rlim_cur))
   > +          return ENOMEM;
   > + 
   > +  /*
   
   Should not this also be checked for brk()/sbrk() call?


i have skipped this for now.  i think i'm going to deprecate
RLIMIT_TEXT/DATA/STACK (make them basically aliases for RLIMIT_AS),
and handle brk at that time.  but that requires a little bit more
thought and maybe MD considerations.

right now touching that code looks... strange.


.mrg.


Home | Main Index | Thread Index | Old Index