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
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 file.
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
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
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
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
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
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
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
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
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
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
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 Linux.
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
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 access past
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 this) it's
16 matches
Mail list logo