You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was reading mmap code here, and I found that mmap actually uses__vm_alloc when MAP_FIXED is not used. However __vm_alloc would search for pages starting at current.brk, the result of this, is that mmap calls would affect brk_max, which then limits the size of memory brk can change.
I'm testing this on rv32imac target but I think the result is the similar across all targets. My question is: is this expected behavior? Does this mean we have to be extra cautious when using mmap?
The text was updated successfully, but these errors were encountered:
Hi there,
I was reading mmap code here, and I found that mmap actually uses
__vm_alloc
whenMAP_FIXED
is not used. However__vm_alloc
would search for pages starting at current.brk, the result of this, is that mmap calls would affectbrk_max
, which then limits the size of memorybrk
can change.So the following program:
Would generate the following result:
I'm testing this on rv32imac target but I think the result is the similar across all targets. My question is: is this expected behavior? Does this mean we have to be extra cautious when using mmap?
The text was updated successfully, but these errors were encountered: