home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!olivea!sgigate!odin!twilight!zola!anchor!olson
- From: olson@anchor.esd.sgi.com (Dave Olson)
- Newsgroups: comp.sys.sgi
- Subject: Re: strange compiler behavior
- Message-ID: <v8go36g@zola.esd.sgi.com>
- Date: 23 Jan 93 21:58:30 GMT
- References: <1993Jan23.043404.20003@Princeton.EDU>
- Sender: news@zola.esd.sgi.com (Net News)
- Organization: Silicon Graphics, Inc. Mountain View, CA
- Lines: 20
-
- In <1993Jan23.043404.20003@Princeton.EDU> igor@fine.Princeton.EDU (Igor Rivin) writes:
- | Why is it that if you declare an uninitialized global array,
- | three times as much virtual space as necessary gets allocated?
- |
- | Trivial example program:
- |
- | #include <stdio.h>
- |
- | char dog[100000];
-
- It was a bug in the code that tried to align global arrays
- that were large on page boundaries. You can defeat it (it
- was turned off in later compiler releases by default) by
- the -Xnobsschange ld option. The reason for the page alignment
- is that can improve performance for some times of i/o, particularly
- raw and networking.
- --
- Let no one tell me that silence gives consent, | Dave Olson
- because whoever is silent dissents. | Silicon Graphics, Inc.
- Maria Isabel Barreno | olson@sgi.com
-