On Fri, Sep 17, 2004 at 03:18:30PM +0200, Utz Lehmann wrote: > Ulrich Drepper [drepper@redhat.com] wrote: > > > A check for CAP_SYS_RESOURCE can be added. But i dont think it's worth. > > > > It is needed. Otherwise how do you allow increasing the stack size > > again once it has been limited? I've no problem with using the smallest > > reserved stack region with !CAP_SYS_RESOURCE, but otherwise the existing > > method should be used. > > I made that change. The following patch only reduce the gap when the > application can not extend the stack space anyway (hard limited stack && > !CAP_SYS_RESOURCE). All other cases stay unchanged except for the 1 MB hole > for soft limited stacks >128 MB. > > It gave a nice way for making most of the default 128 MB gap usable for > applications. Just run them with a hard stack limit. > > Now i can allocate more than 3.8GiB in one chunk on x86 (this patch + > exec-shield + 4g/4g + ulimit -H -s 8192). Ack; nice work!