Diego Nieto Cid, le mar. 24 juin 2025 23:50:49 +0100, a ecrit:
> On Tue, Jun 24, 2025 at 03:54:23PM +0200, Samuel Thibault wrote:
> > Because that is what Linux implements: RLIMIT_AS limits what
> > mmap(PROT_NONE) can allocate. Then, changing with mprotect() will not
> > change the RLIMIT_AS counting.
> >
> 
> mmap(PROT_NONE)[1][2] ends up calling vm_map(cur: VM_PROT_NONE, max: 
> VM_PROT_ALL)
> which is the case I'm finding trouble to test: because max is not 
> VM_PROT_NONE it 
> is accounted as a normal allocation.

Yes, and that's what we want: like on Linux. RLIMIT_AS is supposed to
limit mmap(PROT_NONE) as well.

Samuel

Reply via email to