Tech Insider					     Technology and Trends


		   Linux Activists Mailing List Archives

From: unrza3@cd4680fs.rrze.uni-erlangen.de (Markus Kuhn)
Subject: mmap() not working with SLS 1.02?
Date: Fri, 14 May 1993 22:28:57 +0200
Reply-To: mskuhn@immd4.informatik.uni-erlangen.de

I have encountered a problem with the mmap() function while trying to
port two programs that run fine under SunOS 4.1.* to Linux 0.99pl9. After the
line

  start = mmap(NULL, length, PROT_READ, MAP_SHARED, fileno(f), 0);

start has the value (caddr_t) -1 and perror() prints 'Out of memory',
even if I have many megabytes free and length has only a value of 30000.
The problem appears with files from both local file systems and nfs.
I never managed to get a succesful memory mapped file under Linux.

Any ideas?

Markus

-- 
Markus Kuhn, Computer Science student o University of Erlangen, Germany
Internet: mskuhn@immd4.informatik.uni-erlangen.de  |  X.500 entry available
===================== Esstsonddringtswostsobibringts ======================

From: eric@tantalus.nrl.navy.mil (Eric Youngdale)
Subject: Re: mmap() not working with SLS 1.02?
Date: Wed, 19 May 1993 14:17:25 GMT

In article <1t0ve9E116@uni-erlangen.de> 
mskuhn@immd4.informatik.uni-erlangen.de writes:
>I have encountered a problem with the mmap() function while trying to
>port two programs that run fine under SunOS 4.1.* to Linux 0.99pl9. After the
>line
>
>  start = mmap(NULL, length, PROT_READ, MAP_SHARED, fileno(f), 0);
>
>start has the value (caddr_t) -1 and perror() prints 'Out of memory',
>even if I have many megabytes free and length has only a value of 30000.
>The problem appears with files from both local file systems and nfs.
>I never managed to get a succesful memory mapped file under Linux.
>
>Any ideas?

        The mmap() function is crippled in 0.99pl9, so it will not work as you
are attempting to use it.  Currently only /dev/mem and /dev/zero can be mmaped.
I have sent Linus patches that add a lot of the missing mmap() functionality,
and I hope that they will appear in the next kernel release.  Even with my
patches, changes to a mmaped image are not written back to the disk file,
however.

-Eric

-- 
"When Grigor Samsa woke up one morning from unsettling dreams, he
found himself changed in his bed into a monstrous vermin."
                                        -F. Kafka

			        About USENET

USENET (Users’ Network) was a bulletin board shared among many computer
systems around the world. USENET was a logical network, sitting on top
of several physical networks, among them UUCP, BLICN, BERKNET, X.25, and
the ARPANET. Sites on USENET included many universities, private companies
and research organizations. See USENET Archives.

		       SCO Files Lawsuit Against IBM

March 7, 2003 - The SCO Group filed legal action against IBM in the State 
Court of Utah for trade secrets misappropriation, tortious interference, 
unfair competition and breach of contract. The complaint alleges that IBM 
made concentrated efforts to improperly destroy the economic value of 
UNIX, particularly UNIX on Intel, to benefit IBM's Linux services 
business. See SCO vs IBM.

The materials and information included in this website may only be used
for purposes such as criticism, review, private study, scholarship, or
research.

Electronic mail:			       WorldWideWeb:
   tech-insider@outlook.com			  http://tech-insider.org/