This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A sick idea - mmapped file output
- To: gcc at gcc dot gnu dot org
- Subject: Re: A sick idea - mmapped file output
- From: John Clarke <johnc at vastsystems dot com dot au>
- Date: Fri, 3 Nov 2000 17:24:59 +1100
- References: <20001102214053.G322@wolery.stanford.edu>
On Thu, Nov 02, 2000 at 09:40:31PM -0800, Zack Weinberg wrote:
> - Does it compile on your system?
Yes, with both gcc and Sun cc.
[johnc@medusa ~/tmp]$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.93.04/specs
gcc version egcs-2.93.04 19990131 (gcc2 ss-980929 experimental)
[johnc@medusa ~/tmp]$ cc -V
cc: WorkShop Compilers 5.0 98/12/15 C 5.0
usage: cc [ options] files. Use 'cc -flags' for details
[johnc@medusa ~/tmp]$ uname -a
SunOS medusa.vastsystems.com.au 5.6 Generic_105181-13 sun4u sparc SUNW,Ultra-5_10
> - Does it generate three identical files, each 32MB, when run? They
Yes.
> - What's the timing report say?
Compiled with gcc (-O2):
usr sys wall
stupid 691 42 751
clever 551 62 624
signal 543 50 998
Compiled with Sun cc (-xO5):
usr sys wall
stupid 714 37 780
clever 500 69 581
signal 554 49 994
> You may notice that the program does not munmap the files before
> exiting. (There are commented-out munmap calls in the code.) This is
> because munmap is surprisingly expensive, at least on my machine.
Not so on Solaris. The times were similar with and without munmap.
Cheers,
John
--
whois !JC774-AU@whois.aunic.net