linux-mips
[Top] [All Lists]

Re: Linux/SGI: MAP_AUTOGROW, F_ALLOCSP

To: Miguel de Icaza <miguel@nuclecu.unam.mx>
Subject: Re: Linux/SGI: MAP_AUTOGROW, F_ALLOCSP
From: "William J. Earl" <wje@fir.engr.sgi.com>
Date: Wed, 10 Sep 1997 19:16:48 -0700
Cc: linux@fir.engr.sgi.com
In-reply-to: <199709110204.VAA25377@athena.nuclecu.unam.mx>
References: <199709110204.VAA25377@athena.nuclecu.unam.mx>
Sender: owner-linux@cthulhu.engr.sgi.com
Miguel de Icaza writes:
...
 >      2. The "this sucks, but it will get into the main
 >            kernel real fast": on irix_mmap () if the MAP_AUTOGROW flag
 >            is set, it will check if the top limit for the mmap is
 >            bigger that the current file size, if it is it does:
 >      
 >              o = sys_lseek (fd, offset + len - 1, SEEK_SET);
 >              sys_write (fd, "", 1);
 >              sys_lseek (fd, o, SEEK_SET);
 > 
 >      Any ideas, comments?  I am ready to commit approach (2) ;-)
...

     This seems reasonable enough.  This code supports the "shm" shared
memory transport of Xsgi; other process mmap() the file to communicate
with the server.  It is something of a hack (being not particularly secure).


<Prev in Thread] Current Thread [Next in Thread>