Subject: Re: the mmap() problem, a'la "grep x /dev/zero"

From: Michael Meskes <[email-masked]>
Date: Fri, 7 Jun 1996 09:06:34 +0200 (MET DST)

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                   |    _____ ________ __  ____
[email-masked] |   / ___// ____/ // / / __ \___  __________
[email-masked]                  |   \__ \/ /_  / // /_/ /_/ / _ \/ ___/ ___/
[email-masked]                |  ___/ / __/ /__  __/\__, /  __/ /  (__  )
Use Debian Linux!		 | /____/_/      /_/  /____/\___/_/  /____/