On Tue, 23 Aug 2005, Linus Torvalds wrote:
> On Tue, 23 Aug 2005, Ulrich Drepper wrote:
> > Linus Torvalds wrote:
> > >
> > > Especially if you use MAP_SHARED, you don't even need to mprotect
> > > anything: you'll get a nice SIGBUS if you ever try to access past
> > > the last page that maps the
On Tue, 23 Aug 2005, Ulrich Drepper wrote:
>
> Linus Torvalds wrote:
> >
> > Especially if you use MAP_SHARED, you don't even need to mprotect
> > anything: you'll get a nice SIGBUS if you ever try to access past the last
> > page that maps the file.
>
> If you guarantee this (and test for th
On Tue, 23 Aug 2005, Ulrich Drepper wrote:
> Linus Torvalds wrote:
> > Actually, it should be pretty much as valid as using mremap - ie it works
> > on Linux.
> >
> > Especially if you use MAP_SHARED, you don't even need to mprotect
> > anything: you'll get a nice SIGBUS if you ever try to acce
Linus Torvalds wrote:
> Actually, it should be pretty much as valid as using mremap - ie it works
> on Linux.
>
> Especially if you use MAP_SHARED, you don't even need to mprotect
> anything: you'll get a nice SIGBUS if you ever try to access past the last
> page that maps the file.
If you gu
On Tue, 23 Aug 2005, Ulrich Drepper wrote:
>
> Using mmap with a too-large size for the underlying file and then hoping
> that future file growth is magically handled when those pages are
> accessed is not valid.
Actually, it should be pretty much as valid as using mremap - ie it works
on Linu
Hugh Dickins wrote:
> If the app can plan ahead as you're proposing, why doesn't it just
> mmap the maximum it might need, mprotect PROT_NONE the end it doesn't
> need yet, then progressively re-mprotect parts to make them accessible
> as needed?
Because the underlying file isn't larger than the i
On Tue, 23 Aug 2005, Ulrich Drepper wrote:
>
> One possible solution would be to add a flag to mremap() which allows
> mremap() to steal memory. In general that would be too dangerous but we
> could limit it to private, anonymous mappings which have no access
> permissions (i.e., PROT_NONE with M
Not the mremap() implementation itself, so don't worry.
If mremap() is to be used without the MREMAP_MAYMOVE flag the call will
only succeed of the address space after the block which is to be
remapped is empty. This is rarely the case since there are many users
of mmap and memory is allocated co
8 matches
Mail list logo