Re: the mmap() problem, a'la "grep x /dev/zero"
Linus Torvalds writes:
> Umm, _what_ size? If you set a RLIMIT_DATA (or whatever the name is),
> that will only make a difference for the process bss (*), and if grep
> uses mmap(), then we'd need to have a "virtual memory" limit. However, we
> don't have any such limit, although I added a RLIMIT_AS for 2.0 (but it's
> currently unchecked).
Yes, you're right. Didn't think about that.
> > sources to see what happened. And my program with a global definition of
> > 'char a[128MB]' still dumpos core.
>
> Well, dumping core is the corect thing to do - it failed to get the BSS
> at exec time, so when the program actually ran it was "kind of" unhappy..
I think the bahaviour of the same program compiled in AOUT is much more
correct: It stops with an 'Out of memory' message. IMO we should be able to
have both binary formats do the same.
Michael
--
Michael Meskes | _____ ________ __ ____
meskes@informatik.rwth-aachen.de | / ___// ____/ // / / __ \___ __________
meskes@sanet.de | \__ \/ /_ / // /_/ /_/ / _ \/ ___/ ___/
meskes@debian.org | ___/ / __/ /__ __/\__, / __/ / (__ )
Use Debian Linux! | /____/_/ /_/ /____/\___/_/ /____/
Reply to: