ULIMIT: limiting user virtual address space (stack inluded)

Karaoui mohamed lamine moharaka at gmail.com
Thu May 2 09:06:09 EDT 2019

Hi all,

According to the man page of "ulimit", it is possible to limit the virtual
address space of a user process: https://ss64.com/bash/ulimit.html
To limit the virtual address space to 2 GB:
$ ulimit -SH -v 1048576

However, it seems that "stack" allocation ignores this limit (I tried with
both kernel 4.4 and 4.15).

I found this article (patch) that seems to fix the problem:

My questions are:
- Why is the stack allocation not placed within the "ulimit" limit? (is it
a bug?)
- Is there a way, in user space, to force the stack to be allocated at a
certain address?
- Will the patch above (or similar) ever be integrated into the Linux

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20190502/0971349c/attachment-0001.html>

More information about the Kernelnewbies mailing list